Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   wa**** (https://forums.graalonline.com/forums/showthread.php?t=134257166)

sssssssssss 12-02-2009 05:13 AM

wa****
 
Is was hit still functional?
If so, does it work for only "baddies" or all npcs?

p.s.
cant say wa****, an old if command, lol.

Imperialistic 12-02-2009 05:20 AM

Quote:

Originally Posted by sssssssssss (Post 1541870)
Is was hit still functional?
If so, does it work for only "baddies" or all npcs?

p.s.
cant say wa****, an old if command, lol.

was hit? (minus space)

sssssssssss 12-02-2009 05:21 AM

yeah, didn't realize it would block it out on the topic. My bad.

Imperialistic 12-02-2009 05:23 AM

It worked for me a couple months back, I used to use it on all kinds of images.

cbk1994 12-02-2009 05:24 AM

I'm fairly certain you can use

PHP Code:

function onWas.Hit() { // remove the period
  



DustyPorViva 12-02-2009 05:25 AM

function onWas-Hit() {

}

Is to tell an NPC if he was hit by the default swords.

sssssssssss 12-02-2009 05:26 AM

So if i had a gate or something, an npc, it would work for that too correct?

Sorry, cant test it right now, the gmap is being all screwy.

Crow 12-02-2009 05:37 PM

Theoretically, it'd work, yes. But since you are bringing up gmaps, no. WasHit doesn't work on gmaps. At least it did not on Atlantis a couple months back. You can use something similar to this though:

PHP Code:

//#CLIENTSIDE
function onKeyPressed() {
  if (
player.freezetime || player.paused)
    return;
  
  if (!
keydown(5) || player.ani.name != "sword")
    return;
    
  
temp.tx player.1.5 vecx(player.dir) * 2;
  
temp.ty player.vecy(player.dir) * 2;
  
triggerAction(temp.txtemp.ty"Sword"player.account);


Old piece of code I've been using in the past. Triggers onActionSword(acc) in NPCs in range.

sssssssssss 12-02-2009 06:27 PM

Ahh, cool, because it is on a gmap, at least for this system. Thanks. I was thinking to just use a hd for the npc, but was hoping was.hit would be the cure instead. xD


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

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