Checking stackables

smoochy boys on tour

Funpire

Dedicated Member
Dedicated Member
Jan 21, 2007
29
0
48
Anyone know how to make an NPC check and take stackable items (like CannibalLeaf, SpiderTooth etc)? So basically CHECKITEM and TAKE but for stackable items.
 

Chris22

LOMCN Veteran
Veteran
Jun 10, 2009
372
1
45
Anyone know how to make an NPC check and take stackable items (like CannibalLeaf, SpiderTooth etc)? So basically CHECKITEM and TAKE but for stackable items.

Far as i know there is no command for that no....
 
Upvote 0

Praktica

Dedicated Member
Dedicated Member
Jun 16, 2009
240
1
45
England
I know this is possible as ive seen it on a few servers around.
He means like

You have collected: 23/1000 CatsEye
 
Upvote 0

IceMan

Hero's Act Mir 2
Legendary
Apr 17, 2003
8,544
2
370
350
wouldnt CheckItem name 12 work?

or take name 12

and make the npc setting for stacked items
 
Upvote 0

paul.obrien

LOMCN Veteran
Veteran
Aug 28, 2008
453
4
65
I know this is possible as ive seen it on a few servers around.
He means like

You have collected: 23/1000 CatsEye

for this to work how you want you will have to use a variable to keep count of what you have added.
for example catseye


[@main]
#ACT
Var Integer HUMAN catseye 0
GOTO @start-1

[@start-1]
#IF
CHECKITEM catseye 1
#ACT
TAKE Catseye 1
CalcVar HUMAN Catseye + 1
SaveVar HUMAN Catseye ..\QuestDiary\Variables\Integral.txt
SENDMSG 6 "you have just added 1 x Catseye.You now have <$HUMAN(Catseye)> deposited"

this added + 1 of the catseye variable to the player
you can have diffrent amounts as an option like 5 10 15 20 etc.You must add the Var Integer HUMAN catseye 0 at the top of the script or it will just say variable not found

In the Qmanage you must also add this so it loads up the variable when the players logs in or again when they use the npc it will forget what they have already added

Var Integer Human catseye 0
LoadVar HUMAN catseye ../QuestDiary/Variables/Integral.txt

hope this helps you do what you need it to
 
Upvote 0

Bon

Legend
Legendary
Jul 29, 2004
6,726
330
300
Kent, UK
that would send a error to m2 every time........ u dont need to var it very time u go to the npc, only once

[@main]
#IF
CHECKNAMELIST BLAHLBAH.TXT
#ACT
goto @start-1
break
#ELSEACT
Var Integer HUMAN catseye 0
SaveVar HUMAN catseye ../QuestDiary/Variables/Integral.txt
ADDNAMELIST BLAHLBAH.TXT
goto @start-1



then in qmanage have

#IF
CHECKNAMELIST BLAHLBAH.TXT
#ACT
Var Integer Human catseye 0
LoadVar HUMAN catseye ../QuestDiary/Variables/Integral.txt


once again, my scripting > pobs
 
Upvote 0