Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-10-2009, 10:33 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Bomb and Arrow

Just wondering if its normal for the bomb to not show up on a gmap at all. I also have a scripted bomb, but it wont show up on the gmap either.
arrows just repeat in the level when shot, which is kinda weird.

PHP Code:
//#CLIENTSIDE
function onWeaponFired() { 
if (
player.bombs 0) { 
  
setani("lay"NULL); 
  
freezeplayer(0.2); 
if (
isOnMap) { 
  
temp.px player.- (64 getMapX(player.level)) + 0.5 vecx(player.dir)*2
  
temp.py player.- (64 getMapY(player.level)) + 0.5 vecy(player.dir)*2
  
putBomb(1temp.pxtemp.py); 

else { 
  
putbomb(1,player.vecx(player.dir)*2player.0.5 vecy(player.dir)*2); 

  
player.bombs --; 


if anyone would have a community bomb and arrow script that could fix this problem.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #2  
Old 11-10-2009, 10:40 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by sssssssssss View Post
Just wondering if its normal for the bomb to not show up on a gmap at all. I also have a scripted bomb, but it wont show up on the gmap either.
arrows just repeat in the level when shot, which is kinda weird.

PHP Code:
//#CLIENTSIDE
function onWeaponFired() { 
if (
player.bombs 0) { 
  
setani("lay"NULL); 
  
freezeplayer(0.2); 
if (
isOnMap) { 
  
temp.px player.- (64 getMapX(player.level)) + 0.5 vecx(player.dir)*2
  
temp.py player.- (64 getMapY(player.level)) + 0.5 vecy(player.dir)*2
  
putBomb(1temp.pxtemp.py); 

else { 
  
putbomb(1,player.vecx(player.dir)*2player.0.5 vecy(player.dir)*2); 

  
player.bombs --; 


if anyone would have a community bomb and arrow script that could fix this problem.
When you're on a map, it should just be player.x%64 and player.y%64, you don't need to multiply it by the gmap position, because it's already doing that by default, you have to localize it to the level.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #3  
Old 11-10-2009, 10:47 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I think they're findable if you search the forums but this is pretty much it.

*Bomb

PHP Code:
//#CLIENTSIDE

function onWeaponfired() {
  if (
player.bombs <= 0) return;
  
player.bombs--;
  
freezeplayer(.1);
  
setani("lay",null); 
  
temp.layx player.int(player.64) * 64 .5 vecx(player.dir)*2;
  
temp.layy player.int(player.64) * 64 vecy(player.dir)*2;
  
putbomb(1temp.layxtemp.layy);

*Bow

PHP Code:
//#CLIENTSIDE

function onWeaponfired() {
  if (
player.darts <= 0) return;
  
player.darts--;
  
freezeplayer(.1);
  
setani("shoot""wbow1.png"); 
  
setshootparams("classic""arrow"player.dirplayer.account);
  
temp.angl getangle(vecx(player.dir), vecy(player.dir));
  
shoot(player.0.5 vecx(player.dir), player.vecy(player.dir), player.ztemp.angl00"classic_arrow"player.dir);
}  

function 
onActionProjectile(ptypeatypepdirpacc) {
  if (
ptype != "classic" && atype != "arrow") return;
  if (
findplayer(pacc).guild == player.guild && player.guild) return;
  
hitplayer(01player.1.5 vecx(pdir), player.vecy(pdir));

You'll have to change the gani used for the projectile in the shoot function though.
__________________
Quote:
Reply With Quote
  #4  
Old 11-10-2009, 10:58 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
I've searched the forums, and all I got was that bomb script I posted.
The one given in this thread works even less, the other script would take away the bombs on the gmap still, this one posted here won't do anything.

Darts neither.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #5  
Old 11-10-2009, 11:05 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
The script posted has been personally tested and confirmed to work. Don't know what you're doing wrong, but you might have to do level.putbomb or something.

Also, be aware that if your weapons are named 'Bomb' and 'Bow' you're going to have compatibility issues with the default weapons as they will always load the default scripts first until the weapons are updated.
Reply With Quote
  #6  
Old 11-10-2009, 11:28 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
I dunno what i could be doing wrong either, being you simply put the script in a weapon and add it, and change the shoot gani
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #7  
Old 11-11-2009, 12:35 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
It was a space behind clientside.
The gani in the projectile, is that just the dart, is that the gani of the player shooting the arrow, or what?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #8  
Old 11-11-2009, 12:40 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Yup, gotta watch the spaces behind the clientside!
Reply With Quote
  #9  
Old 11-11-2009, 08:19 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Ok, so the bomb and arrow were working for about 8 hours, and now, once again, I can see absolutely nothing when I lay a bomb on the gmap. The arrows also still repeat itself on the level. Any ideas?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #10  
Old 11-11-2009, 08:31 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Like I said, when you log on the scripts will be overwritten with the default. You have to rename it to something other than Bow and Bomb.
Reply With Quote
  #11  
Old 11-12-2009, 12:03 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
oh sorry, missed that.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #12  
Old 11-12-2009, 12:10 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
actually, did that, and on random levels, still cant see them. Some i can, some i cant.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #13  
Old 11-13-2009, 04:17 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
New for today, even though weapons "Bombs" should be adding on player log in, and has been for the last day, now its not showing up in my Q menu, even though in my attributes its in my weapons list.

Getting strange.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:39 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.