Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-14-2011, 09:49 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan Send a message via Skype™ to mrnothersan
Bombs and Bows

Can anybody tell me how to add bombs and arrows weapons to my playerworld please? Like the default weapons on Classic iPhone
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #2  
Old 05-14-2011, 10:38 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan Send a message via Skype™ to mrnothersan
.....?
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #3  
Old 05-15-2011, 12:59 AM
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
You script them.

As *Bow and/or *Bomb, and add them using addweapon to player.

Important Functions:
shootarrow(dir);
putbomb(power, x, y);

Search the forums they're probably out there already.
__________________
Quote:
Reply With Quote
  #4  
Old 05-15-2011, 01:00 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is a jewel in the roughTricxta is a jewel in the rough
arent there problems with the gmap and default bows and arrows though?
__________________
Quote:
Originally Posted by Crono View Post
No look at it, Stefan is totally trolling Thor. Calling Classic a "playerworld" (something it's not supposed to be) is the ultimate subtle insult to a true fan.

It's genius.
Reply With Quote
  #5  
Old 05-15-2011, 01:02 AM
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
Quote:
Originally Posted by Tricxta View Post
arent there problems with the gmap and default bows and arrows though?
On V5, V6 is fine though.

I posted them before here:
http://forums.graalonline.com/forums...36&postcount=3
__________________
Quote:
Reply With Quote
  #6  
Old 05-15-2011, 02:01 AM
MattKan MattKan is offline
the KattMan
Join Date: Aug 2010
Location: United States
Posts: 1,325
MattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to behold
Send a message via AIM to MattKan Send a message via Skype™ to MattKan
I think you can just add yourself Bombs and Bow...
__________________
Quote:
Originally Posted by Satoru Iwata
On the other hand, free-to-play games, if unbalanced, could result in some consumers paying extremely large amounts of money, and we can certainly not expect to build a good relationship with our consumers in this fashion. In order to have a favorable long-term relationship, we would like to offer free-to-play games that are balanced and reasonable.
Quote:
Originally Posted by Unximad
Eurocenter Games remains attached to the values of indies game developer and to the service our playerbase community.
Reply With Quote
  #7  
Old 05-15-2011, 02:45 AM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
Quote:
Originally Posted by MattKan View Post
I think you can just add yourself Bombs and Bow...
You can edit your attributes, but you still need to script the weapon to use them.
Reply With Quote
  #8  
Old 05-15-2011, 02:50 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Soala View Post
You can edit your attributes, but you still need to script the weapon to use them.
I could be wrong but I think if you add yourself Bow and Bomb the default ones will work. I would rescript them anyway.
__________________
Reply With Quote
  #9  
Old 05-15-2011, 03:01 AM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
Quote:
Originally Posted by cbk1994 View Post
I could be wrong but I think if you add yourself Bow and Bomb the default ones will work. I would rescript them anyway.
How do they work if the wNPC is not on the server? Are default bombs and bow used from a seperate file, like in the level editor?
Reply With Quote
  #10  
Old 05-15-2011, 03:07 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Soala View Post
How do they work if the wNPC is not on the server? Are default bombs and bow used from a seperate file, like in the level editor?
Pretty sure it's just something special in the client that makes those work. I could, of course, be wrong.
__________________
Reply With Quote
  #11  
Old 05-15-2011, 03:42 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
The default weapons are implemented with built-in scripts, if you want to write a custom one then you need to use a different weapon name.
I'm not sure if we have already posted the default scripts, but they are quite simple, here the bomb and bow:
Graal Script Code:
//#CLIENTSIDE
function onWeaponFired() {
  if (
player.bombs<=0)
    return;
  if (
player.dir==0putbomb(1,player.x+0.5,player.y-1);
  if (
player.dir==1putbomb(1,player.x-1.5,player.y+1);
  if (
player.dir==2putbomb(1,player.x+0.5,player.y+2.5);
  if (
player.dir==3putbomb(1,player.x+2.5,player.y+1);
  
player.bombs--;

Graal Script Code:
///#CLIENTSIDE
function onWeaponFired() {
  if (
player.darts<=0)
    return;
  
freezeplayer(0.3);
  
setani("shoot","wbow1.png");
  
setTimer(0.25);
}
function 
onTimeout() {
  
shootarrow(player.dir);
  
player.darts--;

Reply With Quote
  #12  
Old 05-19-2011, 06:53 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan Send a message via Skype™ to mrnothersan
what would be the NPC code to add bombs to a player... as in if somebody said "10 bombs" it would add 10 bombs to the player?
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #13  
Old 05-19-2011, 07:34 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan Send a message via Skype™ to mrnothersan
does nobody know or does it not exist
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #14  
Old 05-19-2011, 07:35 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
Graal Script Code:
function onPlayerChats() {
  if (
player.chat == "10 bombs") {
    
player.bombs += 10;
  }

Would only work in a level. You need to try to look around yourself and figure things out before asking the forums though.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #15  
Old 05-19-2011, 07:43 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan Send a message via Skype™ to mrnothersan
Quote:
Originally Posted by Tigairius View Post
You need to try to look around yourself and figure things out before asking the forums though.
i know i know

where would i put the PHP code...
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 05:43 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.