Cant get setguild to work
I'm trying to get it so this NPC puts the player into a guild after you say a few things. Heres the error i'm getting
Code:
Line: 10,File: quests/load2/170467.qst | error C0002: 'if' :syntax error : '(' 0 Code:
EVENT_ITEM{ |
EVENT_ITEM{
if($item1 == "6"){ setguild("6","5"); castspell("$userid","4498"); } } |
Well that fixed one of the errors, but i'm still getting
Quote:
|
I see your using the qst format...
http://www.everquestserver.com/forum...pic.php?t=5719 is still the best referance as far as I know. I do not see a setguild command listed. Hmm surch turns up http://www.everquestserver.com/forum...pic.php?t=8653 but I'm not sure what was ever actually put in. Glancing thru parser.cpp for 5.3 dr2 It looks like several of the commands that were discussed on the boards didn't make it in the code, or got lost. setguild seems to be one of them, although it looks like at least killspree had code with it in there. Oh and the qst format does not use ; I also prefer $itemcount, since it dosen't chare what slot the item gets put in Code:
EVENT_ITEM{ |
Alright thanks. Starting to sound kind of hopeless :(
I do however remember the Scorpious2k server having a NPC that offered you to join a guild. It didn't work in 5.x though I think :( |
IIRC, the #command interface maintains a big mapping of function names to function pointers. An enterprising coder could extend the quest parser to hook that table in reverse to export a buttload of new functionality in one simple swoop. That may be better than adding all the setfaction(), setguild(), etc, commands one at a time, since most of them already have #cmd interfaces.
Alternatively, you could just add the command you need. I have described the way to do it elsewhere. If you can't compile your own binaries/modify the code, then you could just connect directly to mysql and mess w/ the guild stuff directly from the quest code. The connection details can be read from the eqemu config files. Make your db connection on event_spawn and cache it so that you aren't making a new connection everytime the quest fires. Should perform adequately. |
Quote:
|
eglin posted it in this post: http://www.everquestserver.com/forum...ic.php?p=61069
I would love to see someone make all the EQEmu commands avaliable to the quests (qst and pl) I asume that is what you meant eglin. I wish I had the motivation to learn the skill to do it... oh well :/ |
The case of the missing setguild command for the qst format quest files seems to just be an oversight. The code is in the program, but the table of commands it uses to identify the command and number of parameters doesn't have it.
in parser.cpp Code:
string cmds("if 0|break 1|spawn 6|settimer 2|stoptimer 1|dbspawnadd 2|echo 1|summonitem 1|castspell 2|say 1|emote 1|shout 1|depop 1|cumflag 1|flagclient 2|exp 1|level 1|safemove 1|rain 1|snow 1|givecash 4|pvp 1|doanim 1|addskill 2|flagcheck 1|me 1|write 2|settarget 2|follow 1|sfollow 1|save 1|setallskill 1|"); Code:
string cmds("if 0|break 1|spawn 6|settimer 2|stoptimer 1|dbspawnadd 2|echo 1|summonitem 1|castspell 2|say 1|emote 1|shout 1|depop 1|cumflag 1|flagclient 2|exp 1|level 1|safemove 1|rain 1|snow 1|givecash 4|pvp 1|doanim 1|addskill 2|flagcheck 1|me 1|write 2|settarget 2|follow 1|sfollow 1|save 1|setallskill 1|setguild 2|"); |
Confirming that that fix does infact work!
I cant thank you enough Scorpious, you're the man. |
Glad to help out :-)
|
I'm doing the code changes to bring the S2K server up to 5.3DR2, and noticed that there are other quest commands missing from that list...
rebind,faction,settime,setguild,setsky,flagnpc,mov epc,gmmove,movegrp and attack are all missing. In addition dbspawnadd and flagclient are in the list but I don't see anywhere that they are executed... so if you want to avoid any more missing quest commands try replacing the line discussed above with: Code:
string cmds("if 0|break 1|spawn 6|settimer 2|stoptimer 1|rebind 4|echo 1|summonitem 1|castspell 2|say 1|emote 1|shout 1|depop 1|cumflag 1|flagnpc 1|exp 1|level 1|safemove 1|rain 1|snow 1|givecash 4|pvp 1|doanim 1|addskill 2|flagcheck 1|me 1|write 2|settarget 2|follow 1|sfollow 1|save 1|setallskill 1|faction 2|settime 2|setguild 2|setsky 1|movepc 4|gmmove 3|movegrp 4|attack 1|"); |
While you're adding things... here are all the ones missing from the perl version (including faction and setguild that have already been posted elsewhere)
Code:
"sub faction{push(@cmd_queue,{func=>'faction',args=>join(',',@_)});}" |
LOL I was JUST thinking about that!
Do the commands have to be in the regular parser for those lines to activate the perl counterparts? Or is the perl parser tieing into something else. Sorry I know just enough C to cut and paste my way into trouble :twisted: And I'll get all this into the perl quest guide shortly |
In the case of Quest::xxxx commands, the Perl interface seems to grab the command, do some preprocessing and then passes it off to Parser::ExCommands in parser.cpp for the actual execution of it.
I haven't delved deeply into it. |
All times are GMT -4. The time now is 08:34 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.