QFunction-0 Help

OoOoOo24

Golden Oldie
Golden Oldie
Apr 30, 2005
1,713
20
175
Wales~Cardiff
How do you make it so when you click an item a box appears? i tried [@main]
#SAY
blablabla


but it dowsnt work - item just disapears.......



Any help?


ty
 

gandy

Dedicated Member
Dedicated Member
May 13, 2003
94
0
82
Code:
[@Stdmodefunc1]

#SAY
blah blah blah\\
<Exit/@exit>

You also need to create an item with std mode 31 and anicount 1 for that to work. If you use anicount 2/3/4/5 etc you need to change [@Stdmodefunc1] to [@Stdmodefunc2/3/4/5]

I think thats right anyway, ive not tested it yet just going from memory
 
Upvote 0

OoOoOo24

Golden Oldie
Golden Oldie
Apr 30, 2005
1,713
20
175
Wales~Cardiff
gandy said:
Code:
[@Stdmodefunc1]
 
#SAY
blah blah blah\\
<Exit/@exit>

You also need to create an item with std mode 31 and anicount 1 for that to work. If you use anicount 2/3/4/5 etc you need to change [@Stdmodefunc1] to [@Stdmodefunc2/3/4/5]

I think thats right anyway, ive not tested it yet just going from memory


im not that stupid ......

when i click the item the box doesnt pop up - item disapears. ....
 
Upvote 0

NewHope

Golden Oldie
Golden Oldie
Nov 18, 2005
1,311
28
184
Is this for items like on euro mirs Christmas/Easter events?
So you get a chance of no item within the box, etc?

If so, heres my script.

[@StdModeFunc1]
#IF
random 2
#ACT
giveitem "item"
break

#IF
random 2
#SAY
The box was empty.
break


The number after random should be changed, to how many options you have within your script - in this case 2.
 
Upvote 0

Fire

Golden Oldie
Golden Oldie
Apr 15, 2003
1,302
1
175
you need to tell us what you have tried and what your script IS, not just examples

otherwise you will just get frustrated with people posting things you have already tried

if the box isnt coming up I would check your database and check the number is right in the qfunction
 
Upvote 0

gandy

Dedicated Member
Dedicated Member
May 13, 2003
94
0
82
I just tested it and it works....

my item:
737,QFunctionTest,31,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,500,5

my script:
Code:
[@StdModeFunc1]

#SAY
TEST - ANICOUNT = 1

As you can see it works fine, you have probably set the wrong anicount in the DB.
 

Attachments

  • untitled.JPG
    untitled.JPG
    16.7 KB · Views: 155
Upvote 0

stephenking

I HAVE A DREAM!!
Developer
Aug 28, 2005
616
39
155
Netherlands
one question how many scripts you got in your q-Func atm?

cause i had same problem once cause i had huge scripts in the q-Func file think its to big to load propper so what i did to fix that look below for example

this is how my QFunction-0.txt looks like nice and clean it all works fine now
but when i dont use #CALL and just do scripts in Qfunc it messes up

Code:
(i just copie pased so this what my QFunc looks like exactly)
 
;Auto Npc script for items use stdmode 31 Anicount 1|2|3|4|5|6|7|8|9|11
 
;Remote   Orb    Script  anicount  1
;Summon   deva   script  anicount  2
;                Script  anicount  3
;                script  anicount  4
;MobPro   Orb    lvl 25  anicount  5
;MobPro   Orb    lvl 37  anicount  6
;MobPro   Orb    lvl 48  anicount  7
;Summon   slave  script  anicount  8
;Guild    Tele   script  anicount  9
;Random   Dig    Script  anicount  10
;Random   Wing   script  anicount  11
 
()
%100
;===================================================
;RemoteOrb Script anicount 1   ||
[@StdModeFunc1]
#ACT
#CALL    [\Market\RemoteOrb.txt]      @remotemain
;======================================================
;Summon deva script anicount 2  ||
[@StdModeFunc2]
#ACT
#CALL    [\Market\SummonDeva.txt]      @devamain
;======================================================
;CustomCommands (not working atm dunno why:( )
[@UserCmd1] 
#IF
CheckLevel > 38
#ACT
MAPMOVE 0 333 268
break
#ELSEACT
Sendmsg 5 You.need.to.be.level.38.to.use.this
break
[@UserCmd2]
#IF
CheckLevel > 38 
#ACT
RECALLMOB WarSlave1
#ELSEACT
Sendmsg 5 You.need.to.be.level.38.to.use.this
break
;=====================================================
;Random Dig Script anicount 10   ||
[@stdmodefunc10]
#ACT
#CALL    [\Market\RandomDig.txt]        @digmain
;=====================================================
;Summon Slave script anicount 8  ||
[@stdmodefunc8]
#ACT
#CALL    [\Market\SummonSlave.txt]      @slavemain
;=====================================================
;Mob Pro Orb's lvl 25 anicount 5
[@stdmodefunc5]
#ACT
#CALL    [\Market\mobproorb25.txt]      @promain
;=====================================================
;Mob Pro Orb's lvl 37 anicount 6
[@stdmodefunc6]
#ACT
#CALL    [\Market\mobproorb37.txt]      @prommain
;=====================================================
;Mob Pro Orb's lvl 48 anicount 7
[@stdmodefunc7]
#ACT
#CALL    [\Market\mobproorb48.txt]      @pronmain
;=====================================================
;Guild    Tele   script  anicount  9
[@stdmodefunc9]
#ACT
SENDMSG 5 Guild.teleport's.are.still.under.construction
;#CALL    [\Market\guildtele.txt]      @guildtelmain
;=====================================================
;Random Armour Wing's script anicount 11
[@Stdmodefunc11]
#ACT
#CALL    [\Market\WingOrb.txt]      @wingmain
;=====================================================

well i think it could be this cause of to much scripting in the qfunc
if it isnt it will still be a nice tip for you and/or other ppl :P


(and btw check your m2server it should give a msg if it cant load script when using qfunc item)
 
Upvote 0

OoOoOo24

Golden Oldie
Golden Oldie
Apr 30, 2005
1,713
20
175
Wales~Cardiff
stephenking said:
one question how many scripts you got in your q-Func atm?

cause i had same problem once cause i had huge scripts in the q-Func file think its to big to load propper so what i did to fix that look below for example

this is how my QFunction-0.txt looks like nice and clean it all works fine now
but when i dont use #CALL and just do scripts in Qfunc it messes up

Code:
(i just copie pased so this what my QFunc looks like exactly)
 
;Auto Npc script for items use stdmode 31 Anicount 1|2|3|4|5|6|7|8|9|11
 
;Remote   Orb    Script  anicount  1
;Summon   deva   script  anicount  2
;                Script  anicount  3
;                script  anicount  4
;MobPro   Orb    lvl 25  anicount  5
;MobPro   Orb    lvl 37  anicount  6
;MobPro   Orb    lvl 48  anicount  7
;Summon   slave  script  anicount  8
;Guild    Tele   script  anicount  9
;Random   Dig    Script  anicount  10
;Random   Wing   script  anicount  11
 
()
%100
;===================================================
;RemoteOrb Script anicount 1   ||
[@StdModeFunc1]
#ACT
#CALL    [\Market\RemoteOrb.txt]      @remotemain
;======================================================
;Summon deva script anicount 2  ||
[@StdModeFunc2]
#ACT
#CALL    [\Market\SummonDeva.txt]      @devamain
;======================================================
;CustomCommands (not working atm dunno why:( )
[@UserCmd1] 
#IF
CheckLevel > 38
#ACT
MAPMOVE 0 333 268
break
#ELSEACT
Sendmsg 5 You.need.to.be.level.38.to.use.this
break
[@UserCmd2]
#IF
CheckLevel > 38 
#ACT
RECALLMOB WarSlave1
#ELSEACT
Sendmsg 5 You.need.to.be.level.38.to.use.this
break
;=====================================================
;Random Dig Script anicount 10   ||
[@stdmodefunc10]
#ACT
#CALL    [\Market\RandomDig.txt]        @digmain
;=====================================================
;Summon Slave script anicount 8  ||
[@stdmodefunc8]
#ACT
#CALL    [\Market\SummonSlave.txt]      @slavemain
;=====================================================
;Mob Pro Orb's lvl 25 anicount 5
[@stdmodefunc5]
#ACT
#CALL    [\Market\mobproorb25.txt]      @promain
;=====================================================
;Mob Pro Orb's lvl 37 anicount 6
[@stdmodefunc6]
#ACT
#CALL    [\Market\mobproorb37.txt]      @prommain
;=====================================================
;Mob Pro Orb's lvl 48 anicount 7
[@stdmodefunc7]
#ACT
#CALL    [\Market\mobproorb48.txt]      @pronmain
;=====================================================
;Guild    Tele   script  anicount  9
[@stdmodefunc9]
#ACT
SENDMSG 5 Guild.teleport's.are.still.under.construction
;#CALL    [\Market\guildtele.txt]      @guildtelmain
;=====================================================
;Random Armour Wing's script anicount 11
[@Stdmodefunc11]
#ACT
#CALL    [\Market\WingOrb.txt]      @wingmain
;=====================================================

well i think it could be this cause of to much scripting in the qfunc
if it isnt it will still be a nice tip for you and/or other ppl :P


(and btw check your m2server it should give a msg if it cant load script when using qfunc item)


My UserCmd's dont work either :(


my script for my stdfunc - trying to make a gemming system!

[@StdModeFunc4]
[@main]
#SAY
You Have clicked a Magic Gem ....What item to you want to add mc to?\
<RingL/@R> -- <BraceL/@B> -- <Necklace/@N> -- Weapon/@W>\
<RingR/@RR> -- <BraceR/@BR>\

[@R]
#ACT
UPGRADEITEMEX 8 3 3 1 1

[@B]
#ACT
UPGRADEITEMEX 6 3 3 1 1

[@N]
UPGRADEITEMEX 3 3 3 1 1

[@W]
UPGRADEITEMEX 1 1 3 1 1

[@RR]
UPGRADEITEMEX 7 3 3 1 1

[@BR]
UPGRADEITEMEX 5 3 3 1 1
 
Last edited:
Upvote 0

Redox

Dedicated Member
Dedicated Member
Jun 9, 2004
18
0
28
UK
When i click on my item i get a pot sound effect, the item dissapears without any of the script i wrote working. Then when i log back in the item is back in my bag.
 
Upvote 0

gandy

Dedicated Member
Dedicated Member
May 13, 2003
94
0
82
OoOoOo24 said:
My UserCmd's dont work either :(


my script for my stdfunc - trying to make a gemming system!

You dont need the [@main] at the top.
Also you dont have #ACT bit on all of the headers which will make them bits not work
 
Upvote 0

BloodDemon

Golden Oldie
Golden Oldie
Jul 20, 2003
649
19
155
Darlington, UK
Redox said:
When i click on my item i get a pot sound effect, the item dissapears without any of the script i wrote working. Then when i log back in the item is back in my bag.

i had tht problem a while back, it happaned with all pots including status effect 1s like impacts. I got the latest m2server and it seemed to fix the problem. Hope it helps
 
Upvote 0