--Global Arerna -- g_arena=nil g_player=nilfunction Arena_OnCreate(arena) -- Set our global value g_arena = arena -- Initialize random math.randomseed(os.time())endfunction Player_OnJoin(player) if (noSkills(player) == true)then player:inventory_modify("Soldier",1) player:message("It would seem you have never played Infantry RPG before, if this is true please type ?tutorial") else player:message("Welcome back to Infantry RPG " .. player.m_name .. ", type in ?login to join the world") endendfunction Player_OnUnspec(player) -- player player:message("You need to type ?tutorial") return falseendfunction noSkills(player) -- Finds out if a player has skills if (player:skillFind(1) == false) then if (player:skillFind(2) == false) then if (player:skillFind(3) == false) then if (player:skillFind(4) == false) then if (player:skillFind(5) == false) then if (player:skillFind(6) == false) then if (player:skillFind(7) == false) then if (player:skillFind(8) == false) then if (player:skillFind(9) == false) then if (player:skillFind(10) == false) then return true end return false end return false end return false end return false end return false end return false end return false end return false end return false endendfunction Msg_OnCommand(plyr, command, payload, recipient, msg_type) -- player, string, string, string, integer local player = plyr if (command == "?tutorial")then --Tutorial Command player:message("Welcome to Infantry RPG, you will soon get used to ") player:message("the style of gameplay however here are the basics.") player:message("You will first notice you are your on team this is ") player:message("because I am trying to keep a very RPG feel to this game.") player:message("If you wish to team up with other people you will need ") player:message("to goto a tavern in one of the many cities and type ") player:message("?party 'The Name of the Party:Password if any' without the '.") player:message("You get money and experience by killing other people or ") player:message("mining and selling the resources back to the local NPC purchaser.") player:message("There are 4 ways to advance your character in this Zone. ") player:message("Training, Certifications, Permissions, and Class Changes.") player:message("Each way has its pros and cons, by visiting a trainer in ") player:message("a city you can recieve training which will allow you to use different weapons.") player:message("Certifications work the same as training however you ") player:message("might be required to get both in order to get a new class or use new weapons.") player:message("Permissions allow you to do certain things such as build things, ") player:message("drive certain vehicles and to get aura bonuses.") player:message("Class Changing in this zone is different than any other zone, ") player:message("first you must reach the requirements of that ") player:message("class then you must find a trainer in the ") player:message("city, and ask him to change your class. ") player:message("Then you will be asked a couple of simple questions ") player:message("about your decision to change classes and then allowed to change."); player:message("When you are ready to join the game type ?login .") end if (command == "?login")then if (noSkills(player) == true)then player:inventory_modify("Soldier",1) player:message("It would seem you have never played Infantry RPG before, if this is true please type ?tutorial") end player:unspec(player.m_name,"unknown") endendfunction Vehicle_OnProduce(vech, plyr, menuitem) -- vehicle, player, integer local vendor = vech local player = plyr local menu = menuitem if (vendor == 411 and menu == 1) then --check if they are trying to get Command Training if (player:getExperience() <= 25000) then -- Check if they have less than 25000 experioence player:message("You need 25,000 Experience, you only have " .. player:getExperience() .. ". Go train some more!") return false elseif (player:getCash() <= 10000) then --Check if they have less than 10,000 cash player:message("You need 10,000 Credits, you only have " .. player:getCash() .. ". Go train some more!") return false elseif (player:inventory_find("Command Training") >= 1) then --Check if they already have the medal player:message("You already have been trained in basic Command skills. You can learn nothing from me!") return false else -- If they meet all those requirements... give them the medal Cause thats the nice thing to do... return true --return boolean (whether to allow the produce or not) end end return trueend