Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 01-13-2013, 01:37 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
Put a passing id and quest name in a clientr.var.

wnpc:
PHP Code:
function onActionServerside()
{
  switch (
params[0])
  {
    case 
"addQuest":
      
temp.checkQuest req("SELECT rowid FROM Quests WHERE name = '" @params[1]@ "'"true);
      if (
temp.checkQuest != null)
      {
        
temp.holder.addarray({temp.checkQuestparams[1]});
        
        echo(
temp.holder);
        
clientr.activeQuests.add(temp.addArray);
      }
    break; 

The rowid is obvious what it is, 0; 1; 2; ect.
The params sent in the test I'm doing is from.....

same wnpc (clientside):
PHP Code:
// Function to add in quests
public function addQuest(temp.questName)
{
  if (
temp.questName in clientr.activeQuests)
  {
    return 
"active";
  }else
  {
    
triggerServer("gui"this.name"addQuest"temp.questName);
  }

(which obviously the first if statement isn't working b/c the array is jacked)

and that temp.questName is coming from a level npc joined class as....

class:
PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
this.quest "Fake Quest 1";
}
function 
onPlayerTouchsMe()
{
  
findweapon("-System/QuestTracker").addQuest(this.quest);

for now nothing is set on the level npc itself, it's set in the class, just trying to get it to work first...
__________________
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
 

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 09:57 AM.


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