[2.3] script help pls

SabreMir

Dedicated Member
Dedicated Member
Jul 21, 2012
114
2
45
basically i want a npc to give a charcter a weapon for their class once they have completed the quest


---------- Post Merged at 04:51 PM ---------- Previous Post was at 01:38 PM ----------

i have followed a few guides but still have a few probs can some1 look @ scripts for me and tell me where i have gone wrong cheers

1st npc

[@main]
#IF
checklevelex < 33
Check [012] 0
#SAY
Welcome <$USERNAME>, can you help me out ?\\


\
<Yer sure...../@quest> \
\
<No Thanks/@exit> \ \




#IF
CHECKLEVELEX > 33
#SAY
I have nothing to say to you! \\


<OK..../@exit>


#ELSESAY
Have you got my Letter?\
\
<Yes/@letter>\
<No/@exit>


[@letter]
#IF
Check BensLetter 1
SET [012] 1
CHECKJOB Warrior
#ACT
goto @war
break


#IF
CheckJob Taoist
#ACT
goto @tao
break


#IF
CheckJob Wizard
#ACT
goto @wiz


#Say
Thankyou enjoy your Reward. \


<Cheers/@exit>


[@war]
#Act
Take Ben'sLetter
Give JudgementMace 1


[@tao]
#ACT
Take Ben'sLetter
Give SoulSpringWand 1


[@wiz]
#ACT
Take Ben'sLetter
Give WarMageStaff 1








[@quest]
#act
set [010] 1
#say
Please go Find Charlie on Pranja Island. \
he has a letter for me but he wont leave the island, \
as he is scared of the water. \
<Okay, I'll get your letter/@exit>


problem with 1st 1 is im getting errors in m2server> Quest problem: SET [012] 1 Row:29 Filename: .\Envir\Npc_def\Ben-0.txt

also if i test by making the item needed to complete quest he does not take it nor give me quest reward





2nd NPC
[@main]
#IF
check [010] 1
#SAY
You must be <$USERNAME>, Ben told me he was sending \
you to collect his letter, but i left it in my workshop as it has \
become infested with Rats and im scared of them, \
would you kill them for me and find Ben's Letter? \\


<Sure..../@sure>\
<Do it your self/@exit>
#ACT
BREAK


#IF
CHECK [012] 1
#ACT
GIVE BookofExperience 1
SET [012] 0
#SAY
Thankyou my basement is now safe and you have the \
letter for Ben, take this for helping me, oh and \
dont forget to return to Ben to give him his letter. \\


<Bye/@exit>




[@Sure]
#IF
CHECKMAPHUMANCOUNT OU14 = 0
#ACT
CLEARMAPMON OU14
Param1 ou14
Param2 52
Param3 52
MonGen Rat 40 40
MonGen Rat1 1 40
SET [012] 1
MAP ou14
#SAY
Clear the room and find my Letter. \\
<Exit/@exit>
#ElseSay
There is someone in my Workshop, please try later. \\
<Exit/@Exit>
#ElseAct
Break






#ElseSay
i dont know you begone!! \\


<Fine..../@exit>

this 1 teles me to room it should but no mobs are spawning in there hav i set this 1 up right ???

in mapquest.txt i have added this line > ou14 [011] 1 Rat * ClearOut

in MapQuest_def i have added a txt file called ClearOut
[@main]
#IF
CHECKREALMONMAP OU14 0
#ACT
MAPMOVE 5 139 336
SET [011] 0
SET [012] 1
#SAY
All rats killed thank you. \\
<Exit/@exit>
BREAK


and the 2 NPC r in sql TBL_NPC so can some1 tell me where ive gone wrong please :)

Cheers
Sabre
 
Last edited:

Madrinha

Dedicated Member
Dedicated Member
Nov 16, 2011
174
6
45
Amstadam
(Selected weapon)

[@MAIN]
#IF
CHECKJOB ( WAR WIZ TAO)
#SAY
.....
#ACT
GIVE (WEAPON OF CHOICE)
#ELSESAY
Sorry but you arent (WAR, WIZ TAO)

CHECKJOB WarriorChecks if you are a Warrior, options: Warrior, Wizard, Taoist




(Spawn in mob on tele)
#ACT
MOVEMAP (NAME COORDS)
MONGEN (MobName) 5 10

[Spawns 5 Mobs in a 10 square radius around the map. Params: Param1 (mapname), Param2(Quantity), Param3(Radius)]


Hope this helps.
 
Upvote 0

SabreMir

Dedicated Member
Dedicated Member
Jul 21, 2012
114
2
45
cheers Madrinha but i think i edited as u posted lols any ideas problem with my script ?
 
Upvote 0

Madrinha

Dedicated Member
Dedicated Member
Nov 16, 2011
174
6
45
Amstadam
MISSION ou14 52 52
Param1 52
Param2 52
Param3 40 < Radius
Param4 40 < Quantity
MonGen Rat
MonGen Rat1

^ -- shud work


and for your weapon choice

[@MAIN]
#IF
Check BensLetter 1
#SAY
<I am a Warrior/@Letter>\
<I am a Wizard/@Letter1>\
<I am a Taoist/@Letter2>\
#ELSESAY
Sorry but It seems you dont have the Letter!.
<exit/@exit>

[@letter]
#IF
CHECKJOB Warrior
#ACT
TAKE (ITEM)
GIVE (ITEM)
SENDMSG 6 "Thankyou enjoy your Reward. \
#elsesay
Sorry but it appears you arent a Warrior.

[@Letter1]
#IF
CheckJob Wizard
#ACT
TAKE (ITEM)
GIVE (ITEM)
SENDMSG 6 "Thankyou enjoy your Reward. \
#elsesay
Sorry but it appears you arent a Wizard.

[@Letter2]
#IF
CheckJob Taoist
#ACT
TAKE (ITEM)
GIVE (ITEM)
SENDMSG 6 "Thankyou enjoy your Reward. \
#elsesay
sorry but it appears you arent a Taoist.


That should work better for you :) hope this helps lol
 
Last edited:
Upvote 0