Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

On Attack Sub


Cellino
 Share

Recommended Posts

In the on attack sub, Does that work with spells to? Or would I have to put it in another sub.
I'm asking this because I want to put hiding / invisibility into my game, but I don't want it to last even after they attack. So, when they attack / cast a spell they become uninvisible
Link to comment
Share on other sites

you would have to force this in source to stop people from just making the names show.

make a spell as regular just using scripted instead of all the other options.
In the scriptedspells sub just make a script to:
save current sprite number in an .ini.
set sprite to blank sprite.
possibly lock movement.

have a second ability to undo everything the first one does.

get fancy and make the thing break when attacked or when moving.
Link to comment
Share on other sites

INI power…
PutVar([…],GetPlayerName(index)]
SetPlayerName(index, "")

SetPlayerName(index, GetVar([…]))

This is no exact code, and the major leak is the fact that if your player's in a guild, hes a guildname walkin around…
Plus its no uses against monsters...
I might come out with exact code all made with some other stuff... Later, when I'll get some free time...
Link to comment
Share on other sites

source would be best to do this,

just add an varible to the player (server side)

make an new command for sadscript (server side)

in the command add a line to send the info to the player to set his name, guild, sprite to 0
(remember: send this to the entire map the player is on)

then alter the playerwarp sub to send the info when the player leaves the map and enters a new one (server)

add an check in the on attack sub (either main or source)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...