Convidado Convidado
| Assunto: [ALL]Save (Automático) Sáb 28 Ago 2010, 22:42 | |
| Insira no fim do seu Principal.txt Código: - Código:
-
Sub Save(index) Call PlayerMsg(INDEX, "Você salvou seus dados", 1) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "NecklaceSlot" , "0") Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "RingSlot" , "0") Call PutVar("Banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "NecklaceSlot" , "0") Call PutVar("Banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "RingSlot" , "0") Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Guild" , GetPlayerGuild(index)) Call PutVar("Banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Guild" , GetPlayerGuild(index))
Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "EXP" , GetPlayerExp(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Class" , GetPlayerClass(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Sprite" , GetPlayerSprite(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "ArmorSlot" , GetPlayerArmorSlot(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "WeaponSlot" , GetPlayerWeaponSlot(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "HelmetSlot" , GetPlayerHelmetSlot(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "ShieldSlot" , GetPlayerShieldSlot(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Level" , GetPlayerLevel(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "HP" , GetPlayerHP(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "MP" , GetPlayerMP(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "SP" , GetPlayerSP(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "STR" , GetPlayerSTR(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "DEF" , GetPlayerDEF(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "SPEED" , GetPlayerSPEED(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "MAGI" , GetPlayerMAGI(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "POINTS" , GetPlayerPOINTS(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Map" , GetPlayerMap(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "X" , GetPlayerX(Index)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Y" , GetPlayerY(Index)) n = 1 Do While n < 25 Call PutVar("accounts" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "InvItemNum" & n, GetPlayerInvItemNum(Index, n)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "InvItemVal" & n, GetPlayerInvItemValue(Index, n)) Call PutVar("accounts" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "InvItemDur" & n, GetPlayerInvItemDur(Index, n)) n = n + 1 Loop n = 1 Do While n < 21 Call PutVar("accounts" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "Spell" & n, GetPlayerSpell(Index, n)) n = n + 1 Loop Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "NecklaceSlot" , "0") Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "RingSlot" , "0") Call PutVar("Banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "NecklaceSlot" , "0") Call PutVar("Banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "RingSlot" , "0") Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "EXP" , GetPlayerExp(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Class" , GetPlayerClass(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Sprite" , GetPlayerSprite(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "ArmorSlot" , GetPlayerArmorSlot(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "WeaponSlot" , GetPlayerWeaponSlot(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "HelmetSlot" , GetPlayerHelmetSlot(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "ShieldSlot" , GetPlayerShieldSlot(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Level" , GetPlayerLevel(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "HP" , GetPlayerHP(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "MP" , GetPlayerMP(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "SP" , GetPlayerSP(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "STR" , GetPlayerSTR(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "DEF" , GetPlayerDEF(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "SPEED" , GetPlayerSPEED(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "MAGI" , GetPlayerMAGI(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "POINTS" , GetPlayerPOINTS(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Map" , GetPlayerMap(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "X" , GetPlayerX(Index)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Y" , GetPlayerY(Index)) n = 1 Do While n < 25 Call PutVar("banks" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "InvItemNum" & n, GetPlayerInvItemNum(Index, n)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "InvItemVal" & n, GetPlayerInvItemValue(Index, n)) Call PutVar("banks" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "InvItemDur" & n, GetPlayerInvItemDur(Index, n)) n = n + 1 Loop n = 1 Do While n < 21 Call PutVar("banks" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "Spell" & n, GetPlayerSpell(Index, n)) n = n + 1 Loop End Sub Procure por: Código: - Código:
-
Sub LeftGame(index) Dim GameName Dim n Insira esse código na linha abaixo: Código: - Código:
-
Call Save(index) Feito, quando vc sair do jogo ou desconectar vc pode ficar tranquilo que seus itens e status estão salvos Very Happy ( tutorial testado e aprovado ) Creditos: Slash (Adriano) |
|