Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Quests

Archive::Quests Archive area for Quests's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-26-2003, 01:42 PM
Bearik's Avatar
Bearik
Hill Giant
 
Join Date: Nov 2003
Location: Washington
Posts: 104
Default 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
 '('s still not closed.
Line: 10,File: quests/load2/170467.qst | error C0007: 'setguild' : Unknown funct
ion
Line: 10,File: quests/load2/170466.qst | error C0002: 'if' :syntax error : '(' 0
 '('s still not closed.
Line: 10,File: quests/load2/170466.qst | error C0007: 'setguild' : Unknown funct
ion
It looks as if it doesn't even recognize it as a function. Heres the quest file.

Code:
  EVENT_ITEM{  
    if($item1 == "6");  
    setguild("6","5");      
    castspell("$userid","4498");}  
   }
Reply With Quote
  #2  
Old 12-26-2003, 04:21 PM
Rogean's Avatar
Rogean
Administrator
 
Join Date: Jul 2003
Location: Massachusetts
Posts: 708
Default

EVENT_ITEM{
if($item1 == "6"){
setguild("6","5");
castspell("$userid","4498");
}
}
__________________
EQEmulator Developer / Administrator
Reply With Quote
  #3  
Old 12-26-2003, 04:40 PM
Bearik's Avatar
Bearik
Hill Giant
 
Join Date: Nov 2003
Location: Washington
Posts: 104
Default

Well that fixed one of the errors, but i'm still getting
Quote:
Line: 0,File: none | error C0007: 'setguild' : Unknown function
No guild invite is being sent. :/ The part in red is what I really dont get, Line 0 file none?
Reply With Quote
  #4  
Old 12-26-2003, 05:49 PM
Lurker_005
Demi-God
 
Join Date: Jan 2002
Location: Tourist town USA
Posts: 1,671
Default

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{  
    if($itemcount("6") == 1)
    setguild("6","5")
    castspell("$userid","4498")}  
   }
__________________
Please read the forum rules and look at reacent messages before posting.
Reply With Quote
  #5  
Old 12-26-2003, 06:00 PM
Bearik's Avatar
Bearik
Hill Giant
 
Join Date: Nov 2003
Location: Washington
Posts: 104
Default

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 :(
Reply With Quote
  #6  
Old 12-26-2003, 07:06 PM
Eglin
Hill Giant
 
Join Date: Nov 2003
Posts: 168
Default

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.
Reply With Quote
  #7  
Old 12-26-2003, 08:21 PM
Bearik's Avatar
Bearik
Hill Giant
 
Join Date: Nov 2003
Location: Washington
Posts: 104
Default

Quote:
Alternatively, you could just add the command you need. I have described the way to do it elsewhere.
Where do you decribe how to do this? I cant compile but I have little coding experience.
Reply With Quote
  #8  
Old 12-27-2003, 03:09 PM
Lurker_005
Demi-God
 
Join Date: Jan 2002
Location: Tourist town USA
Posts: 1,671
Default

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 :/
__________________
Please read the forum rules and look at reacent messages before posting.
Reply With Quote
  #9  
Old 12-27-2003, 04:15 PM
Scorpious2k's Avatar
Scorpious2k
Demi-God
 
Join Date: Mar 2003
Location: USA
Posts: 1,067
Default

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|");
needs to have setguild added like this

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|");
I haven't had a chance to test it, but this appears to be the problem and if so, a fairly simple solution.
__________________
Maybe I should try making one of these servers...
Reply With Quote
  #10  
Old 12-27-2003, 06:48 PM
Bearik's Avatar
Bearik
Hill Giant
 
Join Date: Nov 2003
Location: Washington
Posts: 104
Default

Confirming that that fix does infact work!

I cant thank you enough Scorpious, you're the man.
Reply With Quote
  #11  
Old 12-28-2003, 09:25 AM
Scorpious2k's Avatar
Scorpious2k
Demi-God
 
Join Date: Mar 2003
Location: USA
Posts: 1,067
Default

Glad to help out
__________________
Maybe I should try making one of these servers...
Reply With Quote
  #12  
Old 12-28-2003, 12:55 PM
Scorpious2k's Avatar
Scorpious2k
Demi-God
 
Join Date: Mar 2003
Location: USA
Posts: 1,067
Default

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|");
__________________
Maybe I should try making one of these servers...
Reply With Quote
  #13  
Old 12-28-2003, 01:23 PM
Scorpious2k's Avatar
Scorpious2k
Demi-God
 
Join Date: Mar 2003
Location: USA
Posts: 1,067
Default

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(',',@_)});}" 
"sub setguild{push(@cmd_queue,{func=>'setguild',args=>join(',',@_)});}"
"sub rebind{push(@cmd_queue,{func=>'rebind',args=>join(',',@_)});}" 
"sub flagcheck{push(@cmd_queue,{func=>'flagcheck',args=>join(',',@_)});}"
"sub write{push(@cmd_queue,{func=>'write',args=>join(',',@_)});}" 
"sub settime{push(@cmd_queue,{func=>'settime',args=>join(',',@_)});}"
"sub setsky{push(@cmd_queue,{func=>'setsky',args=>join(',',@_)});}" 
"sub settimer{push(@cmd_queue,{func=>'settimer',args=>join(',',@_)});}"
"sub stoptimer{push(@cmd_queue,{func=>'stoptimer',args=>join(',',@_)});}"
"sub settarget{push(@cmd_queue,{func=>'settarget',args=>join(',',@_)});}"
"sub follow{push(@cmd_queue,{func=>'follow',args=>join(',',@_)});}" 
"sub sfollow{push(@cmd_queue,{func=>'sfollow',args=>join(',',@_)});}"
"sub movepc{push(@cmd_queue,{func=>'movepc',args=>join(',',@_)});}"
"sub gmmove{push(@cmd_queue,{func=>'gmmove',args=>join(',',@_)});}"
"sub movegrp{push(@cmd_queue,{func=>'movegrp',args=>join(',',@_)});}"
"sub setallskill{push(@cmd_queue,{func=>'setallskill',args=>join(',',@_)});}"
"sub attack{push(@cmd_queue,{func=>'attack',args=>join(',',@_)});}"
"sub save{push(@cmd_queue,{func=>'save',args=>join(',',@_)});}"
__________________
Maybe I should try making one of these servers...
Reply With Quote
  #14  
Old 12-28-2003, 01:27 PM
Lurker_005
Demi-God
 
Join Date: Jan 2002
Location: Tourist town USA
Posts: 1,671
Default

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
__________________
Please read the forum rules and look at reacent messages before posting.
Reply With Quote
  #15  
Old 12-28-2003, 01:38 PM
Scorpious2k's Avatar
Scorpious2k
Demi-God
 
Join Date: Mar 2003
Location: USA
Posts: 1,067
Default

In the case of Quest:xxx 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.
__________________
Maybe I should try making one of these servers...
Reply With Quote
Reply


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 -4. The time now is 05:59 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3