View Single Post
  #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