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

04-25-2004, 04:03 AM
|
Old-EQEmu Developer
|
|
Join Date: Oct 2002
Location: Spain
Posts: 323
|
|
Functions
I've done the following perl functions:permaclass(class),permarace(race),permag ender(gender),surname("surname") and scribespells().Scribespells scribes all spells to the user,up to his level,so if the user is lvl 9,he will get all spells up to 9.I am adding more functions at the moment,so look here sometimes.Be sure to use correct ID's,and strings(like surname,cannot be number).
This goes into parser.cpp,for example by line 800:
Code:
else if (!strcmp(strlwr(command),"addldonpoint")) {
if (mob && mob->IsClient())
mob->CastToClient()->UpdateLDoNPoints(atoi(arglist[0]),atoi(arglist[1]));
}
else if (!strcmp(strlwr(command),"surname")) { //Cofruben:-Changes the last name.
if (mob && mob->IsClient())
{
mob->CastToClient()->ChangeLastName(arglist[0]);
mob->CastToClient()->Message(15,"Your surname has been changed/set to: %s",arglist[0]);
}
else
mob->CastToClient()->Message(15,"Error changing/setting surname");
}
else if (!strcmp(strlwr(command),"permaclass")) {//Cofruben:-Makes the client the class specified
mob->CastToClient()->SetBaseClass(atoi(arglist[0]));
mob->CastToClient()->Save(2);
mob->CastToClient()->Kick();
}
else if (!strcmp(strlwr(command),"permarace")) {//Cofruben:-Makes the client the race specified
mob->CastToClient()->SetBaseRace(atoi(arglist[0]));
mob->CastToClient()->Save(2);
mob->CastToClient()->Kick();
}
else if (!strcmp(strlwr(command),"permagender")) {//Cofruben:-Makes the client the gender specified
mob->CastToClient()->SetBaseGender(atoi(arglist[0]));
mob->CastToClient()->Save(2);
mob->CastToClient()->Kick();
}
else if (!strcmp(strlwr(command),"scribespells")) {//Cofruben:-Scribe spells for user up to his actual level.
int book_slot;
int16 curspell;
for(curspell = 0, book_slot = 0; curspell < SPDAT_RECORDS && book_slot < MAX_PP_SPELLBOOK; curspell++)
{
if
(
spells[curspell].classes[WARRIOR] != 0 &&
spells[curspell].classes[mob->CastToClient()->GetPP().class_-1] <= mob->CastToClient()->GetLevel() &&
spells[curspell].skill != 52
)
{
mob->CastToClient()->ScribeSpell(curspell, book_slot++);
}
}
}
else if (!strcmp(strlwr(command),"changedeity")) { //Cofruben:-Changes the deity.
if (mob && mob->IsClient())
{
mob->CastToClient()->SetDeity(atoi(arglist[0]));
mob->CastToClient()->Message(15,"Your Deity has been changed/set to: %i",arglist[0]);
mob->CastToClient()->Save(1);
mob->CastToClient()->Kick();
}
else
mob->CastToClient()->Message(15,"Error changing Deity");
}
this goes to embparser.cpp,before myra comment for example(line ~412):
Code:
"sub permagender{push(@cmd_queue,{func=>'permagender',args=>join(',',@_)});}"//Cofruben:-New perma functions
"sub permarace{push(@cmd_queue,{func=>'permarace',args=>join(',',@_)});}"
"sub scribespells{push(@cmd_queue,{func=>'scribespells',args=>join(',',@_)});}"
"sub permaclass{push(@cmd_queue,{func=>'permaclass',args=>join(',',@_)});}"
"sub surname{push(@cmd_queue,{func=>'surname',args=>join(',',@_)});}"
"sub addldonpoint{push(@cmd_queue,{func=>'addldonpoint',args=>join(',',@_)});}"
"sub changedeity{push(@cmd_queue,{func=>'changedeity',args=>join(',',@_)});}"
add this in client.h,for deity change:
Code:
inline void SetDeity(uint32 i) {m_pp.deity=i;}
Hope it helps.
|
 |
|
 |

04-26-2004, 03:15 AM
|
Discordant
|
|
Join Date: Jan 2004
Location: 47
Posts: 339
|
|
It certainly does.  Just added it to Quest Repository CVS code.
Note that these may break the char record if used unproperly, but, well, quests writers be carefull !
How about writting a short 'how to add more functions to quests', that describes argument declaration, and so and so ... More people could contribute and have custom functions in their quests.
|

05-01-2004, 08:47 PM
|
 |
Dragon
|
|
Join Date: Mar 2004
Location: France, Bordeaux.
Posts: 677
|
|
/drool
In which release this will be added ?
__________________
|

05-15-2004, 01:25 AM
|
 |
Dragon
|
|
Join Date: Mar 2004
Location: France, Bordeaux.
Posts: 677
|
|
Corfuben, i have a question. Is it possible to ass a PERL command to change deity ?
__________________
|

05-15-2004, 03:01 AM
|
Discordant
|
|
Join Date: Jun 2003
Location: England
Posts: 267
|
|
Nice work, thanks alot 
__________________
;o)
|

05-15-2004, 05:53 AM
|
Discordant
|
|
Join Date: May 2004
Location: The DeathStar of David
Posts: 337
|
|
Very nice, this will come in handy for sure, could put a guy in the pok that casts perma illusions so you can go into cities that you are normally KoS, and khan had a good idea on the deity change, only question i would have with that is deity based spells. would it just make it so you couldn't mem the spell? or would you crash each time you opened your spell book =/? if i knew how to code it i would try =(, anyway thanks for the cool code =) nice work.
__________________
Mess with the Jews, and we will take all your money
Grunties Rule
And with that... I end
Any Other Questions, please refer to the Following:
http://iliilllli1.netfirms.com
|

05-15-2004, 08:12 AM
|
Dragon
|
|
Join Date: Jan 2004
Posts: 860
|
|
I haven't really looked at the code for it but it would probably have no effect on spells you already know but you wouldn't be able to learn new spells that have a restricted diety because it is most likely only checked when learning the spell. I say this because this is how equipment works, if you equip something and change classes the equipment continues to work until you take it off.
|
 |
|
 |

05-17-2004, 12:45 AM
|
Old-EQEmu Developer
|
|
Join Date: Oct 2002
Location: Spain
Posts: 323
|
|
I didnt find any client function to change the deity,so you will have to make three things things.
in parser.cpp add this:
Code:
else if (!strcmp(strlwr(command),"changedeity")) { //Cofruben:-Changes the deity.
if (mob && mob->IsClient())
{
mob->CastToClient()->SetDeity(atoi(arglist[0]));
mob->CastToClient()->Message(15,"Your Deity has been changed/set to: %i",arglist[0]);
mob->CastToClient()->Save(1);
mob->CastToClient()->Kick();
}
else
mob->CastToClient()->Message(15,"Error changing Deity");
}
add this to embparser.cpp
Code:
"sub changedeity{push(@cmd_queue,{func=>'changedeity',args=>join(',',@_)});}"
and finally,add this to client.h:
Code:
inline void SetDeity(uint32 i) {m_pp.deity=i;}
here is a list of deity:
Agnostic 396
Veeshan 200
Bertoxxulous 201
Brell_Serilis 202
Cazic-Thule 203
Erollisi Marr 204
Bristlebane 205
Innoruuk 206
Karana 207
Mithaniel Marr 208
Prexus 209
Quellious 210
Rallos Zek 211
Rodcet Nife 212
Solusek Ro 213
Tribunal 214
Tunare 215
See you later.
|
 |
|
 |

05-17-2004, 12:47 AM
|
 |
Dragon
|
|
Join Date: Mar 2004
Location: France, Bordeaux.
Posts: 677
|
|
wow ... very nice and thanks corfuben 
/bow
__________________
|

05-17-2004, 12:59 AM
|
Old-EQEmu Developer
|
|
Join Date: Oct 2002
Location: Spain
Posts: 323
|
|
just edited the code,was not working because I had no chance to test it.It works good now.
|

05-17-2004, 09:58 AM
|
Discordant
|
|
Join Date: Jun 2003
Location: England
Posts: 267
|
|
Heh heh , honored to work with ya corf.. you are "teh l337" .. way to go man 
__________________
;o)
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 06:40 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |