How to write this script?

budyniowski

Dedicated Member
Dedicated Member
Dec 16, 2007
149
0
63
Warsaw, Poland
Hi! I need script working like TownTeleport (2x click = action) How to write this script? Shape is responsible for this what script was loaded when You 2x click the item. But how to credit script to shape? Any one know?
Greet Budyniowski




(SORRY FOR MY BAD ENGLISH)
 

mapadale

Guest
Hi! I need script working like TownTeleport (2x click = action) How to write this script? Shape is responsible for this what script was loaded when You 2x click the item. But how to credit script to shape? Any one know?
Greet Budyniowski




(SORRY FOR MY BAD ENGLISH)
Whats the purpose of the script???????
 
Upvote 0

budyniowski

Dedicated Member
Dedicated Member
Dec 16, 2007
149
0
63
Warsaw, Poland
Whats the purpose of the script???????


I want create talisman for tao which summoning a tao pet. This is only outline for my script but this is purpose. Dunno how make item which do something when i 2x clik on it, rest of script i know how write i think.
(RLY SORRY FOR MY ENGLISH ;p)
 
Upvote 0

budyniowski

Dedicated Member
Dedicated Member
Dec 16, 2007
149
0
63
Warsaw, Poland


Witch 00default i must edit and witch place to put itemevent.txt (i have 00default in Envir/market_def and in Envir/quest_diary/market_def) same with system folder. I try do it myself but not work ;p
And i have question : Can i set "SetItemEvent" to 3 xx?
i need somethink like that:
stdmode shape throw
3 xx 3


Edit:

I do it that:
In Mud3\Envir\Market_Def\00default.txt
#ACT
goto @talislawek

[@talislawek]
#CALL [System\ItemEvents.txt] @DawajMoba

And in Mud3\Envir\Quest_Diary\System\ItemEvents.txt

[@DawajMaba]
{
#ACT
SetItemEvent 3 34 @petfortao


[@petfortao]
#IF
CheckItem EloTalisman 1
#ACT
Take Elotalisman 1
MONRECALL WoomaTaurus
Break
#ELSEACT
Break
}


And in the Database, I make a new item with the following stats:
stdmode shape throw
3 34 3


What is wrong? plz tell me ;)
 
Last edited:
Upvote 0

Paul

Dedicated Member
Dedicated Member
Jul 31, 2008
26
0
47
#ACT
goto @talislawek

[@talislawek]
#CALL [System\ItemEvents.txt] @DawajMoba - you spelt it wrong here And in Mud3\Envir\Quest_Diary\System\ItemEvents.txt

Quote:
[@DawajMaba]
{
#ACT
SetItemEvent 3 34 @petfortao


[@petfortao]
#IF
CheckItem EloTalisman 1
#ACT
Take Elotalisman 1
MONRECALL WoomaTaurus
Break
#ELSEACT
Break
}
 
Upvote 0

budyniowski

Dedicated Member
Dedicated Member
Dec 16, 2007
149
0
63
Warsaw, Poland
#ACT
goto @talislawek

[@talislawek]
#CALL [System\ItemEvents.txt] @DawajMoba - you spelt it wrong here And in Mud3\Envir\Quest_Diary\System\ItemEvents.txt

Quote:
[@DawajMaba]
{
#ACT
SetItemEvent 3 34 @petfortao


[@petfortao]
#IF
CheckItem EloTalisman 1
#ACT
Take Elotalisman 1
MONRECALL WoomaTaurus
Break
#ELSEACT
Break
}


Ok now its work, but not correct
Talisman desapear and i have windows error (report/canncel window ;p)
 
Upvote 0

budyniowski

Dedicated Member
Dedicated Member
Dec 16, 2007
149
0
63
Warsaw, Poland
OK! Its work, but... summoning only BoarKing (this is only outline of this script) i need summon other monster for low level and other for high.
I try do that in this way:
Code:
[@DawajMoba]
{
#ACT
SetItemEvent 3 34 @petfortao


[@petfortao]
{
#IF
CheckItem EloTalisman 1
checklevel 200
#ACT
take EloTalisman 1
MONRECALL BoarKing 180
#ELSEACT
goto @petfortao2
#Say
Tu masz swojego protektora\\
<[ Dzieki ]/@exit>\
}
[@petfortao2]
{
#IF
CheckItem EloTalisman 1
checklevel 100
#ACT
take EloTalisman 1
MONRECALL Oma 180
#ELSEACT
goto @petfortao3
#Say
Tu masz swojego protektora\\
<[ Dzieki ]/@exit>\
}
[@petfortao3]
{
#IF
CheckItem EloTalisman 1
checklevel 50
#ACT
take EloTalisman 1
MONRECALL Hen 180
#ELSEACT
break
#Say
Tu masz swojego protektora\\
<[ Dzieki ]/@exit>\
}
but it summoning only mob from [@petfortao] (200+lvl)
and not summoning from [@petfortao2][@petfortao3] for lowest levels :(
Any ideas?
 
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
Use { at the top, and } at the bottom, not all of the others in the middle.

So
Code:
[@DawajMoba]
{
#ACT
SetItemEvent 3 34 @petfortao

[@petfortao]
#IF
CheckItem EloTalisman 1
CheckLevel 200
#ACT
Take EloTalisman 1
MONRECALL BoarKing 180
#ELSEACT
goto @petfortao2
#Say
Tu masz swojego protektora\\
<[ Dzieki ]/@exit>\

[@petfortao2]
#IF
CheckItem EloTalisman 1
checklevel 100
#ACT
take EloTalisman 1
MONRECALL Oma 180
#ELSEACT
goto @petfortao3
#Say
Tu masz swojego protektora\\
<[ Dzieki ]/@exit>\

[@petfortao3]
#IF
CheckItem EloTalisman 1
checklevel 50
#ACT
take EloTalisman 1
MONRECALL Hen 180
#ELSEACT
break
#Say
Tu masz swojego protektora\\
<[ Dzieki ]/@exit>\
}

Or using less lines :)..

Code:
[@DawajMoba]
{
#ACT
SetItemEvent 3 34 @petfortao

[@petfortao]
#IF
CheckItem EloTalisman 1
CheckLevel 200
#ACT
Take EloTalisman 1
MONRECALL BoarKing 180
Break
#SAY
Tu masz swojego protektora\\
<[ Dzieki ]/@exit>\

#IF
CheckItem EloTalisman 1
CheckLevel 100
#ACT
Take EloTalisman 1
MONRECALL Oma 180
Break
#SAY
Tu masz swojego protektora\\
<[ Dzieki ]/@exit>\

#IF
CheckItem EloTalisman 1
CheckLevel 50
#ACT
Take EloTalisman 1
MONRECALL Hen 180
Break
#SAY
Tu masz swojego protektora\\
<[ Dzieki ]/@exit>\
#ELSESAY
You have to be Level 50 to use this Item\\
#ELSEACT
Break
}
 
Upvote 0

Somebody Else

Dedicated Member
Dedicated Member
Jun 24, 2005
114
0
63
But that will always say "You have to be Level 50 to use this Item" after summoning the correct pet... Or am I just misinterpreting?

Anyway, this thread has been very helpful, thanks ^_^
 
Last edited:
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
But that will always say "You have to be Level 50 to use this Item" after summoning the correct pet... Or am I just misinterpreting?

Anyway, this thread has been very helpful, thanks ^_^

Due to the Break command, if any section is successful it won't run the rest of the script.

/Mick

And Np's m8
 
Upvote 0

Sejanus

Dedicated Member
Dedicated Member
Sep 14, 2006
212
5
64
use !checklevel, so if level isnt equal 200 it goes to another piece of code and check for lvl 150 and so on...

use @goto as act if the level isnt right (in #ACT)
the #ELSEACT = the code code to execute in this example

like this

[@DawajMoba]
{
#ACT
SetItemEvent 3 34 @taopet1

[@taopet1]
#IF
CheckItem EloTalisman 1
!checklevel 100
#ACT
goto @taopet2
#ELSEACT
take EloTalisman 1
MONRECALL StrongMob
#ElseSay
Tu masz swojego protektora\\
<[ Dzieki ]/@exit>\

[@taopet2]
#IF
CheckItem EloTalisman 1
!checklevel 50
#ACT
goto @taopet3
#ELSEACT
take EloTalisman 1
MONRECALL WeakMob
#ElseSay
Tu masz swojego protektora\\
<[ Dzieki ]/@exit>\

}

There are many ways of doing it, i thinkt hat one is most appropriate for that piece of code.
 
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
Every line of code you put into an NPC or any script gets loaded by the server and (I believe) takes up Memory, if there is a simpler way of doing something, do it.

My Example takes up less space, so should be used. Thx.. end of Sermon :)
 
Upvote 0