View Single Post
  #9  
Old 10-23-2007, 02:42 PM
gernblan
Discordant
 
Join Date: Aug 2006
Posts: 394
Default

Quote:
Originally Posted by mamba666 View Post
void changedeity(int diety_id);

Which is it Diety or Deity?


Is it possible to do something like

sub EVENT_SAY
{
if(($text=~/hail/i) && ($deity_id==1))
{
quest::say("Hello fellow Norrathian.");
}
}

.

Read those as a guide... not truly literal.

An example of how to "read" them...

Let's do yours:

void changedeity(int diety_id);

Ok...

First, scrap void. Change that to quest::

So...

quest::changedeity();

Now what?

Inside the parens are the TYPES of values you give the function.

So for follow it wants the deity_id which is of type integer (the list of values and Deitys they represent are probably on the wiki somewhere). So in the parens just give it the value you want.

So now it becomes:

quest::changedeity(4);

That changes the player to Deity #4 (whatever that is...).

Make sense?

The others, just work them out the same way. The definitions inside the parens simply tell you what the function WANTS in terms of the data type and stuff. The rest of it can be figured out in context to what the function actually is supposed to do.
__________________
--
Keelyeh
Owner, ServerOp and Developer
Jest 4 Server
Linux (Jest3 runs on Fedora, our Dev servers usually run on Ubuntu and/or Gentoo), OC-12 Connection = Hella Fast
Reply With Quote