View Single Post
  #1  
Old 11-27-2005, 06:46 AM
talkingnoodle talkingnoodle is offline
Rapidwolve
talkingnoodle's Avatar
Join Date: Nov 2005
Location: Leominster, MA
Posts: 229
talkingnoodle is on a distinguished road
Send a message via AIM to talkingnoodle Send a message via MSN to talkingnoodle
Angry punching and projectiles

Im runnin GS2 on my server and everybody has this weapon, its just that the projectile part isnt working...
NPC Code:

//#CLIENTSIDE
function onCreated(){
setTimer(.05);
}
function onTimeout(){
if (player.ani == "sword") {
setani("punch", " ");
triggerAction(player.x+1.5+vecx(playerdir)*2,playe r.y+2+vecy(playerdir)*2, "punch", "player.account", "player.guild");
}
setTimer(.05);
}

function onActionProjectile(){
if (params[0] == "punch"){
player.chat == "You have been punched by "@params[1]@" ";
setstring("client.lasthitby"," "@params[1]@" ");
setani("hurt", " ");
}
}




PS: The player.chat part is only to check to see if the script works...
Reply With Quote