NPC to move/come back/set mobs/clear map

smoochy boys on tour

Raffis

Dedicated Member
Dedicated Member
Dec 9, 2008
69
1
34
I need help

i have a problem, i want write a script, but i dont know how comands i must use; now i say what i want to do in this script:
On the first he must find thing and give this npc. Then npc teleport him to other map, there he must kill some mobs (and here i dont know how to do it*). If he killed mobs, he come back to game and got one of skill book.
______________________________
*Here i've two idea:
a)first:
When player go there, mobs resp for 1 minute and he must kill all, after this he has 1 minute relax and resp next mobs, after this he has 1 minute relax and resp last mobs; If he died, he'll teleport to city :)
b)second:
When player go there, mobs are on start, after 3 minute resp next mobs and for next 3 minute resp last mobs -if he didn't kill mobs and he died, he'll teleport to city :)
----------
Thanks,
Raffis
 

stagg

LOMCN Veteran
Veteran
Sep 28, 2008
283
1
45
Re: I need help

that sounds like a game already in db?


just change a what u wnt ?
 

Attachments

  • SurviveGame.txt
    7 KB · Views: 56
Last edited:
Upvote 0

Raffis

Dedicated Member
Dedicated Member
Dec 9, 2008
69
1
34
Re: I need help

Hmmm... Thanks stagg, there is some comands which can help me.
Sorry, but i don't know along what i must write this script right. If you can write what this script must be right, i'll very thank you.
 
Upvote 0

stagg

LOMCN Veteran
Veteran
Sep 28, 2008
283
1
45
Re: I need help

if u go to desertmudwall youll find an npc is already their and iam gunna wrk on a new event and iam learning so wnt be fast xD


(dose that count as a thanks in post xD )
 
Upvote 0

kyeron

LOMCN Veteran
Veteran
Loyal Member
Sep 28, 2008
296
1
45
timisoara
Re: I need help

u can use this one , this will do allmost what u whant if i understood right , u just need to add maybe some special drop to the EventHen that will be 1/1 eventchikens , so if he kills all the 20 eventhen's he will have 20eventchiken's in bag that will be checked and take when u whant to give him the prize , the "delaygoto" is in the script so they have only 3 min's to kill all the 20 hen's

Code:
[@main]
{
#say
Hy u have the "item u need for go inside" ?
<yes/@yes>
<no/@exit>
<I allready whent inside/@give prize>
<were can i find this item/@saywere>

<@yes>
#if
checkitem "item u need for go inside" 1
#act
take "item u need for go inside" 1
mapmove D2005 5 13 ;D2005=the map u whant him to be teleport , 5=X coord , 13=y coord
mongenp "D2005,5,5,20" EventHen 20 ; rs 20 eventhens in d2005 on coords 5 5 on a 20 radius 
delaygoto [local] 180 @clearmap
#elseact
break
#elsesay
You dont have the  "item u need for go inside" 


[@clearmap]
#if
#act
mapting "D2005" "0" 

[@giveprize]
#if
checkitem "eventchikens" 20
#act
take eventchikens 20
give bookname 1 ;bookname=bookname u whant to give to them 
#say
Congratulation for the bookname 
#elseact
break
#elsesay
i see you didnt killed all the hen's , come back when u have 20 eventchickens 


}
in case some1 check's this script and see's any error just point them out i made this while i was watching tv , and usualy i need to try my scrip's more then 1 time to work :D
in case u whant them to make only 1 time this event just add some flags to it , or if u whant to make them to be for lvl's just add some lvl chaking , use the extreme scripting leason's if ur new to this that's the BEST thing's for new ppl :P i didnt understood a thing from script's 2 months ago
 
Upvote 0

Raffis

Dedicated Member
Dedicated Member
Dec 9, 2008
69
1
34
Re: I need help

Ok, thanks, i change and check it.
It didn't all what i want, but write here if somebody have idea on write this script in another way. I need other way with this "pitfall" heh
Thanks guys once more :)
 
Last edited:
Upvote 0

kyeron

LOMCN Veteran
Veteran
Loyal Member
Sep 28, 2008
296
1
45
timisoara
Re: I need help

other exit ? sry maybe i didnt understood wot u really whant to make , the "mapting" moves all the ppl from D2005 to 0 after 3 min's (u can change the time in the "delaygoto [local] 180 to how many sec's u whant" )
 
Upvote 0

Raffis

Dedicated Member
Dedicated Member
Dec 9, 2008
69
1
34
Re: I need help

I change and i write here correctly, thanks for help :) All work good now, look:
Code:
[@main]
#IF
checkmonmap z011 1
#SAY
Somebody doing this quest in this time.\
#ELSEACT
goto @mow

[@mow]
#say
Hi,\
Havye you got a key?\
\
<yes/@yes>\
<no/@exit>

[@yes]
#if
checkitem bluejadebrace 1
#act
take bluejadebrace 1
mapmove z011 11 11
mongenp "z011,11,11,2" Mob 10
delaygoto [local] 25 @clearmap
#elseact
break
#elsesay
You haven't key.\

[@clearmap]
#if
#act
monclear z011   ;this comand is correctly and clear mobs on map
mapmove z010 11 11
#say
Time out.
 
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
I always see this :

Code:
[@clearmap]
#if
#act
mapting "D2005" "0"

use this then:
Code:
[@clearmap]
#act
mapting "D2005" "0"

if you don't use the #if then don't write it, you don't need it.
It optimise your Code and speed up the Script Parser.
 
Upvote 0

Geordiehc

Mad Dog Geo
VIP
Jul 4, 2007
2,827
49
195
Redditch, UK
I always see this :

Code:
[@clearmap]
#if
#act
mapting "D2005" "0"

use this then:
Code:
[@clearmap]
#act
mapting "D2005" "0"

if you don't use the #if then don't write it, you don't need it.
It optimise your Code and speed up the Script Parser.
Fussy Coly :P
 
Upvote 0

Raffis

Dedicated Member
Dedicated Member
Dec 9, 2008
69
1
34
I have two question more:
a)first:
What is comand to clear item from map?
b)second:
When NPC teleport player return, can NPC check item and take it of him? If somebody know how do it, what comand i must use, please write me :)
thanks,
Raffis

I try do it, but i can't. It isn't correctly:
Code:
The beginning of the script

[@walka]
#ACT
mapmove z011 11 11
mongenp "z011,11,11,2" lolek 20
delaygoto [local] 15 @clear

[@clear]
#IF
checkitem bluejadebrace 20
#ACT
monclear z011
mapmove z010 11 11
#ELSEACT
take bluejadebrace 19
monclear z011
mapmove z010 11 11

The rest of the script
 
Last edited:
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
to a.)

You can Clean Items from the Map so :

Code:
ClearItemMap "Map, X, Y, Range" Item or *

[@gold_clear]
#ACT
 ClearItemMap "3, 209, 164, 50" Gold

[@potion_clear]
#ACT
 ClearItemMap "3, 209, 164, 50" SunPotion(M)

[@allitem_clear]
#ACT
 ClearItemMap "3, 209, 164, 50" *


to b.)
If I understand you correct then you can use this:

Code:
....
#ACT
 Set [400] 1
....

and on the MapQuest.txt setup a check for the reback map and check in
the Script this :

#IF
 Check [400] 1
#ACT
 Set [400] 0
 Take Item

....

like this as littel idea...
 
Upvote 0