The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Teleport
Author Message
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #1
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
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Teleport - Alaric - 10-28-2012 12:15 AM
RE: Teleport - Shaklaban - 10-28-2012, 04:45 AM
RE: Teleport - Alaric - 10-28-2012, 07:14 AM
RE: Teleport - Alaric - 10-30-2012, 07:39 AM
RE: Teleport - Extreme - 10-30-2012, 08:31 AM
RE: Teleport - Alaric - 10-30-2012, 08:38 AM
RE: Teleport - Extreme - 10-30-2012, 10:47 AM
RE: Teleport - Alaric - 10-30-2012, 11:53 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)