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")) { Code:
"sub permagender{push(@cmd_queue,{func=>'permagender',args=>join(',',@_)});}"//Cofruben:-New perma functions Code:
inline void SetDeity(uint32 i) {m_pp.deity=i;} |
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. |
/drool
In which release this will be added ? |
Corfuben, i have a question. Is it possible to ass a PERL command to change deity ?
|
Nice work, thanks alot :wink:
|
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.
|
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.
|
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. Code:
"sub changedeity{push(@cmd_queue,{func=>'changedeity',args=>join(',',@_)});}" Code:
inline void SetDeity(uint32 i) {m_pp.deity=i;} 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. |
wow ... very nice and thanks corfuben :)
/bow |
just edited the code,was not working because I had no chance to test it.It works good now.
|
Heh heh , honored to work with ya corf.. you are "teh l337" .. way to go man :wink:
|
All times are GMT -4. The time now is 03:30 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.