adding new code help
im trying to add a new command for quest i came up with the ideal when i was trying to do a quest that did not work the way i wanted. well someone posted code that should work the way i wanted but i decided to go ahead and make the code just to do it as a learning exp well i am havering problems so ill post it here to see if anyone can see whats wrong.
what this should do is read a variable from a new table called server_globals and then the quest should return the correct int. questmgr.cpp Code:
////////////////////////////////////////////ADDED///////////////////////////////////// Code:
///////////////////ADDED////////////////////////////////////////////////// Code:
/////////////////////////ADDED////////////////////////////////////////////////// Code:
sub EVENT_SAY Code:
[07.04. - 07:40:02] Use of uninitialized value in numeric eq (==) at quests/qrg/testpet.pl line 6. |
ok i tried it a diff way and still getting same error.. basically i set it up like the quest_globals scripts. maybe this easier to figure out?
embparser.cpp added Code:
////////ADDED///////////////////////////////////////////////// Code:
if(!isPlayerQuest){ added Code:
///////ADDED////////////////////// Code:
// SCORPIOUS2K - load global variables |
oops that
Code:
///////ADDED////////////////////// |
i figured it out im sorry to have bothered... i will post what i come up with once its done and tested.
|
On a side note, see my post in your original thread. Fortunately but unfortunately, it should make this code redundant.
|
hmm ya i saw that while i was doing code. but i did not understand it all saw that it went to 7 but in the code only went to like 3 did not know you added it up.. question is though is it still tied to the player or npc or is it tied to the server or something like that? becuase what im wanting to do is move from one zone to another with player 1 then the npc in zone 1 should read the variable and tell player 2 the zone is in use come back later and then npc 2 in zone 2 should turn off the same variable so that npc 1 will then again let players in without needing to know what npc its reading from or what player got the variable set? because from the code it seems that it always ties it to a player or npc or zone maybe.
the code i have working now just simply sets a variable to the database name and value and then calls it based on the name.. not set to anything npc,player,zone wise. if the questglobales already do that great but if not thats what i need to know... wasted about 2 days of my time trying to get this to work if it does but hey lol y reinvent the wheel. |
Quote:
Code:
Option: Zone Player NPC Quote:
Hope this provides a little more clarity. |
well just tested it your right it already does exactly what i wanted it to do.. good news for everyone that did not know.. a big wast of time for me lol but thanks for the info really nice to know guess i get to just use this as another learning example for the code base :P eventually i will find something i can contribute lol..
thanks again. |
All times are GMT -4. The time now is 06:55 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.