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

Custom script request


Tic Tac 2
 Share

Recommended Posts

I have an item type that calls custom scripts, and i'd like to make a bomb script that works like this:

1. When script is first called, places a 32x32 sprite of /items/100.png on the ground where you were standing, calls a sound effect /sounds/example.wav to everyone in the map.
2. A timer of three seconds passes
3. After three seconds have passed, remove bomb sprite from map, call animation /animations/10.png and deal 20 damage to everybody in the 3x3 radius, the bomb being in the middle. Also call a sound effect /sounds/boom.wav
Link to comment
Share on other sites

  • 2 weeks later...
Do you need to add on Map Data a new var like Bombs or maybe you can use the TempPlayer Bombs, I think the tempplayer are more efficient:

1\. Make a TempPlayer var .Bomb with a Bomb REC. This BombRec need this values Active,X,Y,Pic,Sound,Spell.
2\. When you use a BOMB Skill or another the client send a packet, in the server do you need to make a sub to create a BOMB like the Projectile System:

' I give a little example without a TIMER because now are the 3:00am on my country, lol.
```
CreateBomb(Byval Index)

bombType = TempPlayer(index).BombType

With TempPlayer(index).Bomb
.x = getplayerx(index)
.y = getplayery(index)
.active = true 
.pic = bombType ' the image of bomb
.Sound = "bomb.wav" ' the sound k-boom
.Spell = 1 ' This value is the Spell AOE of Explosion Radius do you need create this before
End With

SendBombToMap(getplayermap(index), index) ' This sub send the player bomb to people on map

End Sub

-------

SendBombToMap(byval mapnum as long, byval index as long) ' Do you need the index because need show the BOMB values

With TempPlayer(index).Bomb
buffer.writelong(.x)
buffer.writelong(.y)
buffer.writelong(.pic)
buffer.writelong(.sound)
end with

SendDataToMap(mapnum,data.lmao)
end sub
' And you need make a Handle on client and a DrawPlayerBomb(index, bombpicture). Here you need draw the bomb and explosions. Don't miss the PlaySound(SoundBomb) receive.

```
When the bomb exploit do you need to make a ClearPlayerBomb to clean the Data of Client and Server. Good luck ;)
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...