![]() |
Need help with one small thing. - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: Need help with one small thing. (/showthread.php?tid=944) |
Need help with one small thing. - Examines - 21-05-2007 Ok, I wanted to know if theres a code for starting off with an item. Like you register, pick a special class, and you start off with a item already in your inventory. Also, I was planning to have something diffrent for every class, so each class has something diffrent. It would be nice if someone helped me with that. ![]() Thanks~ -Examines- - Matt - 21-05-2007 Sure, find server side where it creates the character, and add a call giveitem(blah) line and you should be good to go. I suggest you check the class first of course, so you can give the correct item for each class. ^_^ - William - 21-05-2007 Open the server, search for Sub JoinGame. Then add something like: Code: If GetPlayerClass(Index) = 1 then - Tony - 21-05-2007 its addchar sub serverside I believe. - William - 21-05-2007 Kuja Wrote:its addchar sub serverside I believe.ohh yeah thats better than joingame ![]() - Tony - 21-05-2007 William Wrote:Kuja Wrote:its addchar sub serverside I believe.ohh yeah thats better than joingame Yeah, by alot. It sets everything in the sub and calls saveplayer i think. So before call saveplayer just do some simple ifs and call giveitem or w/e - Ramsey - 21-05-2007 You could add a variable to the player that would check if it was his first login. If so, you could like set items, quests, etc. - Rian - 21-05-2007 You don't need to add any extra variables. The AddChar Sub handles everything to do with what your character's stats for the first time he logs into the game. - Tony - 22-05-2007 Sonire Wrote:You don't need to add any extra variables. The AddChar Sub handles everything to do with what your character's stats for the first time he logs into the game. Exactly. It sets for an example the class #3 and saves it. Otherwise if its not in that sub (.class=blahblah) then I'm guessing it'll be saved as its default value which is 0 I think o.o and your character will start with class 0. Get it or am I confusing you? - Dark Echo - 22-05-2007 If you want to do it the hard way, the way i'd more than likely do it (i like to keep things all neat and tidy), you could also add an extra variable onto class and call it StartingItem, and in the addchar sub, call giveitem startingitem.. ![]() - Matt - 22-05-2007 Actually, it wouldn't be much more work, and would be the method to do it for an engine. That way, in the classes.ini you could change the starting item, the amount, etc. |