CheckItem for Npc

Join Discord

Zifra

Dedicated Member
Dedicated Member
Sep 11, 2007
23
2
50
Hi, anyone knows how is the problem in this script:

Code:
[@Main]
#IF
checklevel 5
#SAY
Hi there < $USERNAME>.\
Thank you for the letter.\
Do you want go to Woomyon city please?
\
I need four books, help me.\
\
<[Ok, I will help you]/@joblist>\<[I don't want]/@Exit>

#ELSESAY
You can't make this job, yet.\
Train hard and speak with me, when you are level 5.

[@joblist]
#SAY
The job:\
#IF
CHECK [6] 0
#SAY
< Buy Books/@book> - {FCOLOR/10}Reward!{FCOLOR/12} - 250,000 Gold\
#IF
CHECK [6] 1
#SAY
{FCOLOR/12}Buy Books - {FCOLOR/10}Completed!{FCOLOR/12}\
\
Thank you for make this job!\\

<Exit/@Exit>


;;;;;HookingCat;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[@book]
#SAY
Objective:\
Buy the Books:\
Healing, Slaying, Poisoning and AdvancedSlay.\\
Reward:\
250,000 Gold\
\
I have a friend than is living in Woomyon.\
Please, buy him the books.
#IF
CHECK [7] 0
#SAY
< Accept Job/@book1>\
#IF
CHECK [7] 1
#SAY
Job in Progress!\
< I have the books!/@book2>\
#SAY
<Exit/@Exit>

[@book1]
#IF
CHECK [7] 0
#ACT
SET [7] 1
goto @book
break
#ELSEACT
break

[@book2]
#IF
CHECKITEM Healing   
CHECKITEM Slaying
CHECKITEM Poisoning
CHECKITEM AdvancedSlay
#ACT
take Healing
take Slaying
take Poisoning
take AdvancedSlay
take letter1
give gold 250000
SET [6] 1

#SAY
Items Recieved\
Reward Given\
\
< Thanks!/@joblist>
#ELSESAY
Not enough books!\
< Doh!/@Exit>

When I click on "I have the books", without books give me the reward :S
 

chimera

LOMCN VIP
VIP
Jul 30, 2003
1,054
23
235
UK
You are not telling it the number of items to check for.

#IF
CHECKITEM Healing 1
CHECKITEM Slaying 1
CHECKITEM Poisoning 1
CHECKITEM AdvancedSlay 1
#ACT
take Healing 1
take Slaying 1
take Poisoning 1
take AdvancedSlay 1
take letter1 1
give gold 250000

Always use a number :)
 
Upvote 0

Alecs

SPQR
VIP
Jan 10, 2009
3,317
3
1,199
380
Europa
thanks Chimera, great help as always :)

This thread should be moved to NPC/Quest Help section
 
Last edited:
Upvote 0

Zifra

Dedicated Member
Dedicated Member
Sep 11, 2007
23
2
50
Thank you chimera!
Your answer is helpfull :) Script works good now!
 
Upvote 0