Alaric
Journeyman
Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7
|
Teleport
Hi, I began scripting 3 days ago and started with quite hard(for me)script.
It should be a teleport with instant hit.
1.reacts on a command (.teleportation) or reacts on a botton in a spellbook.
2.now some IFs(stamina required and target in sight)
3.the player says something/yells and reduces 20 stam itself.
4.here it checks (if you for example - cast, use skill, the jump wont be finished and sysmessage will say - you interupted jump or whatever.
maybe while cycle get there somehow? and some duration/pause. 2s?
5.and here it should check again if the target is in the sight and jump at it(and @HitTry should be set as TRUE, somehow) and reduce stam by 20.
[ITEMDEF 02254]
defname=asdf //for faster adding, later change
name="Warrior's Book"
weight=0
layer=1
on=@Create
ATTR=attr_newbie
AMOUNT=1
MOREZ=200 //i have no idea why should it be there...I coppied it.
on=@dclick
MOREZ=200 //again, have no idea why
sDIALOG WARBOOK_OPEN
[DIALOG WARBOOK_OPEN]
page 0
gumppic 100 50 02b02
page 1
gumppic 190 125 05302
dtext 188 103 0 War book
dtext 200 195 0 xxxxxxxx
button 320 90 2224 2224 1 2 1
button 320 115 2224 2224 1 0 2
button 320 140 2224 2224 1 0 3
button 320 165 2224 2224 1 0 4
button 320 190 2224 2224 1 0 5
button 320 215 2224 2224 1 0 6
dtext 360 62 0 List
dtext 343 87 0 Teleportation
dtext 343 112 0 2.kouzlo
dtext 343 137 0 3.kouzlo
dtext 343 162 0 4.kouzlo
dtext 343 187 0 5.kouzlo
dtext 343 212 0 6.kouzlo
return
and jump
//-------------------------------------------------------------------------------
[FUNCTION teleportation]
on=@attack //the player attacks
if <src.stam> >= 20 && <src.targ.canseelos>
sound=0512 //or sound=044A
src.emote is about to jump
src.move SRC.TARGP //doesnt work
src.actarg1
src.stam -= 20
elif <src.stam> < 20 //
src.sysmessage Dont have enought stamina for jump
elif //
src.sysmessage Target is not in your sight
return 1
endif
src.sysmessage You arent attacking anybody
return 1
//-------------------------------------------------------------------------------
I'm sorry I want, well, the whole script from you but i rly dont know how to write it and also my English isnt good at all :-/
This script I wrote, is incorrect but these are just my ideas how it shuld work
If somebody could help me, I would be glad.
Alaric
(This post was last modified: 10-28-2012 12:17 AM by Alaric.)
|
|
10-28-2012 12:15 AM |
|
|