Ultima modifica da un moderatore:
Salve inforge!
Oggi vorrei proporvi una release abbastanza vecchia nel uso genere,ma pur essendo vecchia,nessuno ha mai provveduto a postare una cosa simile,quindi a distanza di anni la posto io.
Ci sono persone che usano ancora i file 2011 (Rev.2089M) per creare server in cui giocare con amici o imparare le basi, e fidatevi conosco più di una persona. (Come sappiamo i file più recenti "perfetti" costano soldi).
Essendo l'unica revisione di cui si trovano traduzioni e guide di ogni genere,modifiche e fix di ogni tipo,la maggior parte della gente inizia ad imparare con questi file anche se siamo nel 2017 con la 40k.
Ho pensato di rilasciare questa release perchè un ragazzo mi ha chiesto aiuto su skype in quanto non ne usciva fuori e con un po di tempo gli ho sistemato questo benedetto Pet System,quindi considerando che ci sono persone che amano (me compreso),questa revisione,posto questo system cosi chi vuole lo potrà utilizzare senza problemi.
Successivamente decriptate root.eix/epk,aprite il file npclist.txt e aggiungere all'inizio queste stringhe:
Fra il value (Es. 20120) e il nome del pet (Es. phoenix1) c'è un [TAB],quindi attenti,in caso mancasse il [TAB],avrete problemi con la visione dei pet.
Se aggiungete queste righe in fondo al file npclist.txt (sconsiglio),dovete lasciare 2 righe vuote sotto l'ultima stringa.
Ora potete ricompilare root e ci spostiamo su locale (locale_it),dove inseriremo le query lato client dei Pet e dei sigilli per poter chiamare i Pet.
Query mob_proto client:
Query item_proto client:
Query mob_proto server:
Query item_proto server:
-Pet_System.quest;
-Horse_Summon.quest;
-Pet_System.dif;
-questlib con il relativo script;
-quest_functions con le relative funzioni.
Dirigiamoci su Winscp (O il programma che utilizzate per la gestione dell'FTP) e andiamo nella cartella quest.
Inseriamo all'interno della cartella quest i file Pet_System.quest e Horse_summon.quest.
Successivamente applichiamo la seguente dif al nostro file game:
Ora,sempre in quest,apriamo il file questlib.lua e ci dirigiamo in fondo,lasciamo una riga vuota e successivamente incollate questo:
Fatto questo,apriamo il file quest_functions e all'inizio inseriamo queste 3 funzioni:
Adesso dirigetevi nella cartella object e create una cartella di nome "pet",date i permessi 0777.
Nello script che dovrete inserire nel questlib.lua,controllate i percorsi dove dovrà essere la cartella "pet",perchè alcuni potrebbero avere "italy" invece di "germany".
Una volta fatto questo,basterà compilare le due quest: Pet_System.quest e Horse_summon.quest e successivamente riavviare il server.
Vi basterà cliccare sul sigillo,dare un nome e avrete il vostro Pet.
I pet vi conferiranno 25 punti per ogni status, questa variabile è modificabile.
Vi basterà cercare queste due stringhe all'interno del questlib.lua e modificare 25 con il valore che più vi piace.
Ovviamente è possibile anche cambiare i bonus,ma non sarò io a spiegarvelo.
Vi ringrazio per aver letto,spero che questa guida sia utile a qualcuno.
In caso di dubbi/problemi/consigli non esitate a commentare o contattarmi su skype: RaVe_Soldier
Alla prossima!
Oggi vorrei proporvi una release abbastanza vecchia nel uso genere,ma pur essendo vecchia,nessuno ha mai provveduto a postare una cosa simile,quindi a distanza di anni la posto io.
***PREMESSA***
Sono perfettamente consapevole del fatto che è roba vecchia,so benissimo che con le revisioni di adesso questa cosa è inutile alla maggior parte di voi,ma dobbiamo considerare una cosa:Ci sono persone che usano ancora i file 2011 (Rev.2089M) per creare server in cui giocare con amici o imparare le basi, e fidatevi conosco più di una persona. (Come sappiamo i file più recenti "perfetti" costano soldi).
Essendo l'unica revisione di cui si trovano traduzioni e guide di ogni genere,modifiche e fix di ogni tipo,la maggior parte della gente inizia ad imparare con questi file anche se siamo nel 2017 con la 40k.
Ho pensato di rilasciare questa release perchè un ragazzo mi ha chiesto aiuto su skype in quanto non ne usciva fuori e con un po di tempo gli ho sistemato questo benedetto Pet System,quindi considerando che ci sono persone che amano (me compreso),questa revisione,posto questo system cosi chi vuole lo potrà utilizzare senza problemi.
***RELEASE***
Dunque gente andiamo a vedere come implementare il Pet System.
Visto che sono una persona buona,vi metto anche l'implementazione dei Pet sia lato client che lato server,cosi avete tutto e siete apposto.
Necessario:
-File game rev.2089m;
-Archivi eix/epk dei pet;
-Vari script e quest (Le trovate sotto o nell'archivio).
Visto che sono una persona buona,vi metto anche l'implementazione dei Pet sia lato client che lato server,cosi avete tutto e siete apposto.
Necessario:
-File game rev.2089m;
-Archivi eix/epk dei pet;
-Vari script e quest (Le trovate sotto o nell'archivio).
Pet lato Client
In npclist.txt - mob_proto - item_proto assicuratevi di non avere value o nomi doppi,altrimenti non visualizzerete correttamente i pet.
In npclist.txt - mob_proto - item_proto assicuratevi di non avere value o nomi doppi,altrimenti non visualizzerete correttamente i pet.
Una volta scaricati gli archivi eix/epk,inseriteli nella cartella pack del vostro client,successivamente andate a modificare il file Index (lo trovate sempre in pack) in questo modo,aggiungendo queste due righe subito dopo "PACK":
Codice:
*
patch_pets
Successivamente decriptate root.eix/epk,aprite il file npclist.txt e aggiungere all'inizio queste stringhe:
Codice:
20120 phoenix1
20123 phoenix2
20129 pwahuang1
20132 dog_young1
20135 lion_young1
20138 pig_young1
20141 tiger_young1
20126 reindeer_young
Fra il value (Es. 20120) e il nome del pet (Es. phoenix1) c'è un [TAB],quindi attenti,in caso mancasse il [TAB],avrete problemi con la visione dei pet.
Se aggiungete queste righe in fondo al file npclist.txt (sconsiglio),dovete lasciare 2 righe vuote sotto l'ultima stringa.
Ora potete ricompilare root e ci spostiamo su locale (locale_it),dove inseriremo le query lato client dei Pet e dei sigilli per poter chiamare i Pet.
Query mob_proto client:
Codice:
<Mob vnum="20120" name="'phoenix1'" gb2312name="phoenix1" type="1" rank="5" battle_type="0" level="1" event_type="2" mob_color="0" />
<Mob vnum="20123" name="'phoenix2'" gb2312name="phoenix2" type="1" rank="5" battle_type="0" level="1" event_type="2" mob_color="0" />
<Mob vnum="20129" name="'pwahuang1'" gb2312name="pwahuang1" type="1" rank="5" battle_type="0" level="1" event_type="2" mob_color="0" />
<Mob vnum="20132" name="'dog_young1'" gb2312name="dog_young1" type="1" rank="5" battle_type="0" level="1" event_type="2" mob_color="0" />
<Mob vnum="20135" name="'lion_young1'" gb2312name="lion_young1" type="1" rank="5" battle_type="0" level="1" event_type="2" mob_color="0" />
<Mob vnum="20138" name="'pig_young1'" gb2312name="pig_young1" type="1" rank="5" battle_type="0" level="1" event_type="2" mob_color="0" />
<Mob vnum="20141" name="'tiger_young1'" gb2312name="tiger_young1" type="1" rank="5" battle_type="0" level="1" event_type="2" mob_color="0" />
Query item_proto client:
Codice:
<Item vnum="53001" hashName="'`FeniceRossa`'" name="Fenice Rossa" type="18" subtype="0" weight="0" size="1" antiflag="0" flag="20" wearflag="0" immuneflag="0" gold="2111111111" buy_price="2111111111" limittype0="7" limitvalue0="1728000" limittype1="0" limitvalue1="0" applytype0="0" applyvalue0="0" applytype1="0" applyvalue1="0" applytype2="0" applyvalue2="0" value0="0" value1="0" value2="0" value3="0" value4="0" value5="0" socket0="65535" socket1="65535" socket2="65535" socket3="65535" socket4="65535" socket5="65535" refine_vnum="0" refine_set="0" magic_pct="0" specular="0" socket_pct="3" />
<Item vnum="53002" hashName="'`FeniceBlu`'" name="Fenice Blu" type="18" subtype="0" weight="0" size="1" antiflag="0" flag="20" wearflag="0" immuneflag="0" gold="2111111111" buy_price="2111111111" limittype0="7" limitvalue0="1728000" limittype1="0" limitvalue1="0" applytype0="0" applyvalue0="0" applytype1="0" applyvalue1="0" applytype2="0" applyvalue2="0" value0="0" value1="0" value2="0" value3="0" value4="0" value5="0" socket0="65535" socket1="65535" socket2="65535" socket3="65535" socket4="65535" socket5="65535" refine_vnum="0" refine_set="0" magic_pct="0" specular="0" socket_pct="3" />
<Item vnum="53005" hashName="'`BabyAzrael`'" name="Baby Azrael" type="18" subtype="0" weight="0" size="1" antiflag="0" flag="20" wearflag="0" immuneflag="0" gold="2111111111" buy_price="2111111111" limittype0="7" limitvalue0="0" limittype1="0" limitvalue1="0" applytype0="0" applyvalue0="0" applytype1="0" applyvalue1="0" applytype2="0" applyvalue2="0" value0="2" value1="0" value2="0" value3="0" value4="0" value5="0" socket0="65535" socket1="65535" socket2="65535" socket3="65535" socket4="65535" socket5="65535" refine_vnum="0" refine_set="0" magic_pct="0" specular="0" socket_pct="3" />
<Item vnum="53006" hashName="'`CuccioloLupo`'" name="Cucciolo Lupo" type="18" subtype="0" weight="0" size="1" antiflag="0" flag="20" wearflag="0" immuneflag="0" gold="2111111111" buy_price="2111111111" limittype0="7" limitvalue0="0" limittype1="0" limitvalue1="0" applytype0="0" applyvalue0="0" applytype1="0" applyvalue1="0" applytype2="0" applyvalue2="0" value0="2" value1="0" value2="0" value3="0" value4="0" value5="0" socket0="65535" socket1="65535" socket2="65535" socket3="65535" socket4="65535" socket5="65535" refine_vnum="0" refine_set="0" magic_pct="0" specular="0" socket_pct="3" />
<Item vnum="53007" hashName="'`CuccioloLeone`'" name="Cucciolo Leone" type="18" subtype="0" weight="0" size="1" antiflag="0" flag="20" wearflag="0" immuneflag="0" gold="2111111111" buy_price="2111111111" limittype0="7" limitvalue0="0" limittype1="0" limitvalue1="0" applytype0="0" applyvalue0="0" applytype1="0" applyvalue1="0" applytype2="0" applyvalue2="0" value0="2" value1="0" value2="0" value3="0" value4="0" value5="0" socket0="65535" socket1="65535" socket2="65535" socket3="65535" socket4="65535" socket5="65535" refine_vnum="0" refine_set="0" magic_pct="0" specular="0" socket_pct="3" />
<Item vnum="53008" hashName="'`CuccioloCinghiale`'" name="Cucciolo Cinghiale" type="18" subtype="0" weight="0" size="1" antiflag="0" flag="20" wearflag="0" immuneflag="0" gold="2111111111" buy_price="2111111111" limittype0="7" limitvalue0="0" limittype1="0" limitvalue1="0" applytype0="0" applyvalue0="0" applytype1="0" applyvalue1="0" applytype2="0" applyvalue2="0" value0="2" value1="0" value2="0" value3="0" value4="0" value5="0" socket0="65535" socket1="65535" socket2="65535" socket3="65535" socket4="65535" socket5="65535" refine_vnum="0" refine_set="0" magic_pct="0" specular="0" socket_pct="3" />
<Item vnum="53009" hashName="'`CuccioloTigre`'" name="Cucciolo Tigre" type="18" subtype="0" weight="0" size="1" antiflag="0" flag="20" wearflag="0" immuneflag="0" gold="2111111111" buy_price="2111111111" limittype0="7" limitvalue0="0" limittype1="0" limitvalue1="0" applytype0="0" applyvalue0="0" applytype1="0" applyvalue1="0" applytype2="0" applyvalue2="0" value0="2" value1="0" value2="0" value3="0" value4="0" value5="0" socket0="65535" socket1="65535" socket2="65535" socket3="65535" socket4="65535" socket5="65535" refine_vnum="0" refine_set="0" magic_pct="0" specular="0" socket_pct="3" />
Pet lato Server
In mob_proto - item_proto assicuratevi di non avere value o nomi doppi,altrimenti non visualizzerete correttamente i pet.
Ora terminata la parte client,si passa alla parte server,dove anche qui inseriremo le query sia nel mob_proto che nell'item_proto.In mob_proto - item_proto assicuratevi di non avere value o nomi doppi,altrimenti non visualizzerete correttamente i pet.
Query mob_proto server:
Codice:
INSERT INTO `mob_proto` VALUES ('20120', 'phoenix1', 0x70686F656E697831, '5', '1', '0', '1', '', '', '0', '', 'STUN,SLOW,CURSE,TERROR', '0', '', '2', '0', '0', '0', '0', '0', '0', '120', '3', '1', '1', '1', '400', '4', '100', '100', '0', '2000', '150', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `mob_proto` VALUES ('20123', 'phoenix2', 0x70686F656E697832, '5', '1', '0', '1', '', '', '0', '', 'STUN,SLOW,CURSE,TERROR', '0', '', '2', '0', '0', '0', '0', '0', '0', '120', '3', '1', '1', '1', '400', '4', '100', '100', '0', '2000', '150', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `mob_proto` VALUES ('20129', 'pwahuang1', 0x7077616875616E6731, '5', '1', '0', '1', '', '', '0', '', 'STUN,SLOW,CURSE,TERROR', '0', '', '2', '0', '0', '0', '0', '0', '0', '120', '3', '1', '1', '1', '400', '4', '100', '100', '0', '2000', '150', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `mob_proto` VALUES ('20132', 'dog_young1', 0x646F675F796F756E6731, '5', '1', '0', '1', '', '', '0', '', 'STUN,SLOW,CURSE,TERROR', '0', '', '2', '0', '0', '0', '0', '0', '0', '120', '3', '1', '1', '1', '400', '4', '100', '100', '0', '2000', '150', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `mob_proto` VALUES ('20135', 'lion_young1', 0x6C696F6E5F796F756E6731, '5', '1', '0', '1', '', '', '0', '', 'STUN,SLOW,CURSE,TERROR', '0', '', '2', '0', '0', '0', '0', '0', '0', '120', '3', '1', '1', '1', '400', '4', '100', '100', '0', '2000', '150', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `mob_proto` VALUES ('20138', 'pig_young1', 0x7069675F796F756E6731, '5', '1', '0', '1', '', '', '0', '', 'STUN,SLOW,CURSE,TERROR', '0', '', '2', '0', '0', '0', '0', '0', '0', '120', '3', '1', '1', '1', '400', '4', '100', '100', '0', '2000', '150', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `mob_proto` VALUES ('20141', 'tiger_young1', 0x74696765725F796F756E6731, '5', '1', '0', '1', '', '', '0', '', 'STUN,SLOW,CURSE,TERROR', '0', '', '2', '0', '0', '0', '0', '0', '0', '120', '3', '1', '1', '1', '400', '4', '100', '100', '0', '2000', '150', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
Query item_proto server:
Codice:
INSERT INTO `item_proto` VALUES (53001, '``FeniceRossa``', 'Fenice Rossa', 18, 0, 0, 1, 0, 20, 0, 0, 2111111111, 2111111111, 0, 0, 0, 0, 7, 1728000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, 0, 3, 0);
INSERT INTO `item_proto` VALUES (53002, '``FeniceBlu``', 'Fenice Blu', 18, 0, 0, 1, 0, 20, 0, 0, 2111111111, 2111111111, 0, 0, 0, 0, 7, 1728000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, 0, 3, 0);
INSERT INTO `item_proto` VALUES (53005, '``BabyAzrael``', 'Baby Azrael', 18, 0, 0, 1, 0, 20, 0, 0, 2111111111, 2111111111, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, 0, 3, 0);
INSERT INTO `item_proto` VALUES (53006, '``CuccioloLupo``', 'Cucciolo Lupo', 18, 0, 0, 1, 0, 20, 0, 0, 2111111111, 2111111111, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, 0, 3, 0);
INSERT INTO `item_proto` VALUES (53007, '``CuccioloLeone``', 'Cucciolo Leone', 18, 0, 0, 1, 0, 20, 0, 0, 2111111111, 2111111111, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, 0, 3, 0);
INSERT INTO `item_proto` VALUES (53008, '``CuccioloCinghiale``', 'Cucciolo Cinghiale', 18, 0, 0, 1, 0, 20, 0, 0, 2111111111, 2111111111, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, 0, 3, 0);
INSERT INTO `item_proto` VALUES (53009, '``CuccioloTigre``', 'Cucciolo Tigre', 18, 0, 0, 1, 0, 20, 0, 0, 2111111111, 2111111111, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, 0, 3, 0);
Pet System
Per poter implementare questo system avremo bisogno di alcuni file:
-Pet_System.quest;
-Horse_Summon.quest;
-Pet_System.dif;
-questlib con il relativo script;
-quest_functions con le relative funzioni.
Dirigiamoci su Winscp (O il programma che utilizzate per la gestione dell'FTP) e andiamo nella cartella quest.
Inseriamo all'interno della cartella quest i file Pet_System.quest e Horse_summon.quest.
Successivamente applichiamo la seguente dif al nostro file game:
Codice:
This difference file is created by The Interactive Disassembler
game_r2089M_32
00035011: 74 0F
00035012: 43 8C
00035013: 66 15
00035014: 3D 01
00035015: 86 00
00035016: 4E 00
00035017: 74 90
00035018: 3D 90
0003501B: 87 B6
00035020: 74 7E
00035022: 66 90
00035023: 3D 90
00035024: 88 90
00035025: 4E 90
00035026: 74 90
00035027: 2E 90
00035028: 66 90
00035029: 3D 90
0003502A: 89 90
0003502B: 4E 90
0003502C: 8D 90
0003502D: 74 90
0003502E: 26 90
0003502F: 00 90
00035030: 74 90
00035031: 24 90
00035032: 66 90
00035033: 3D 90
00035034: 8A 90
00035035: 4E 90
00035036: 74 90
00035037: 1E 90
00035038: 66 90
00035039: 3D 90
0003503A: 8B 90
0003503B: 4E 90
0003503C: 8D 90
0003503D: 74 90
0003503E: 26 90
0003503F: 00 90
00035040: 74 90
00035041: 14 90
00035042: 66 90
00035043: 3D 90
00035044: 8C 90
00035045: 4E 90
00035046: 74 90
00035047: 0E 90
0003504A: 8D B6
00430784: 8B 98
004307B4: 8B 9B
004307E4: 8B 9E
00430814: 8B A1
00430844: 8B A4
00430874: 8B A7
004308A4: 8B AA
004308D4: 8B AD
00430904: 8B B0
Ora,sempre in quest,apriamo il file questlib.lua e ci dirigiamo in fondo,lasciamo una riga vuota e successivamente incollate questo:
Codice:
--- Inizio pet system ---
function inizializza(index)
say_title("Pet System:")
say("")
say("Ciao, hai adottato un nuovo cucciolo")
say("per poterlo evocare, come prima cosa")
say("dovrai dargli un nome.")
local scelta = select("Voglio dargli un nome","Chiudi")
if scelta == 2 then
return -1
end
say_title("Pet System:")
say("")
say("Assegna un nome al tuo cucciolo")
say("")
say_reward("Nome:")
local nome = tostring(input())
if nome == "" then
say_title("Pet System:")
say("")
say_reward("Non puoi lasciare vuoto!")
return -1
end
local DATA_PATH = "locale/germany/quest/object/pet/"
local file = io.open(DATA_PATH..pc.get_name().."_"..index , "w")
file:write(nome.."\n1\n0\n")
io.close(file)
os.execute("cd "..DATA_PATH.." && chmod 777 "..pc.get_name().."_"..index)
return 0
end
function evoca(index, isHere)
local bonus = { 3,4,5,6 }
local nome = leggi_dati(1, index)
local livello = leggi_dati(2, index)
local horse_level = horse.get_level()
local level = 21 + index
if isHere == 0 then
local z = 1
while true do
if z == 5 then break end
affect.add_collect(bonus[z], 25, 60*60*60*60)
z = z + 1
end
horse.set_level(level)
horse.set_name(nome)
horse.summon()
chat("Il pet e' stato evocato")
horse.set_level(horse_level)
else
local z = 1
while true do
if z == 5 then break end
affect.remove_collect(bonus[z], 25, 60*60*60*60)
z = z + 1
end
horse.set_level(level)
horse.unsummon()
chat("Il tuo pet e' andato a riposare")
horse.set_level(horse_level)
end
end
function show_pet_menu(index)
local razza = { "Fenice Rossa","Fenice Blu","Renna","Azarel","Cane","Leone","Cinghiale","Tigre" }
local DATA_PATH = "locale/germany/quest/object/pet/"
local nome = leggi_dati(1, index)
local livello = leggi_dati(2, index)
local petExp = leggi_dati(3, index)
say_title("Pet System:")
say("")
say("Benvenuto nel sistema di gestione del pet")
say("")
say_reward("cosa desideri fare?")
local s = select("Stato Pet", "Cambia Nome", "Chiudi" )
if s == 1 then
say_title("Pet System:")
say("")
say("Nome: "..nome)
say("Razza: "..razza[index])
say("Livello: "..livello)
say("Exp: "..petExp)
say("Salute: "..horse.get_health_pct().."%")
say("Resistenza: "..horse.get_stamina_pct().."%")
elseif s == 2 then
say_title("Pet System:")
say("")
say("Assegna un nuovo nome al tuo cucciolo")
say("")
say_reward("Nome:")
local nuovo_nome = tostring(input())
if nuovo_nome == "" then
say_title("Pet System:")
say("")
say_reward("Non puoi lasciare vuoto!")
return
end
if nuovo_nome == nome then
say_title("Pet System:")
say("")
say_reward("Non puoi usare lo stesso nome!")
return
end
local file = io.open(DATA_PATH..pc.get_name().."_"..index.."_" , "w")
file:write(nuovo_nome.."\n"..livello.."\n"..petExp.."\n")
io.close(file)
os.execute("cd "..DATA_PATH.." && chmod 777 "..pc.get_name().."_"..index.."_")
os.execute("cd "..DATA_PATH.." && mv "..pc.get_name().."_"..index.."_ "..pc.get_name().."_"..index)
evoca(index, 1)
evoca(index, 0)
elseif s == 3 then
return
end
end
function leggi_dati(linea, index)
local DATA_PATH = "locale/germany/quest/object/pet/"
local file = io.open(DATA_PATH..pc.get_name().."_"..index , "r")
local x = 1
while true do
local line = file:read("*l")
if line == nil then
io.close(file)
break
end
text = string.gsub(line, "\n", "")
if x == linea then
io.close(file)
return text
end
x = x + 1
end
io.close(file)
end
--- Fine pet system ---
Fatto questo,apriamo il file quest_functions e all'inizio inseriamo queste 3 funzioni:
Codice:
evoca
inizializza
show_pet_menu
Adesso dirigetevi nella cartella object e create una cartella di nome "pet",date i permessi 0777.
Nello script che dovrete inserire nel questlib.lua,controllate i percorsi dove dovrà essere la cartella "pet",perchè alcuni potrebbero avere "italy" invece di "germany".
Una volta fatto questo,basterà compilare le due quest: Pet_System.quest e Horse_summon.quest e successivamente riavviare il server.
Vi basterà cliccare sul sigillo,dare un nome e avrete il vostro Pet.
I pet vi conferiranno 25 punti per ogni status, questa variabile è modificabile.
Vi basterà cercare queste due stringhe all'interno del questlib.lua e modificare 25 con il valore che più vi piace.
Ovviamente è possibile anche cambiare i bonus,ma non sarò io a spiegarvelo.
Codice:
affect.add_collect(bonus[z], 25, 60*60*60*60)
affect.remove_collect(bonus[z], 25, 60*60*60*60)
***Crediti***
Guida + varie modifiche ai file fatte da me
Pet system fatto da D3m0n3
Dif fatta da Gabss
Horse_summon.quest fatta da blackyuko
Guida + varie modifiche ai file fatte da me
Pet system fatto da D3m0n3
Dif fatta da Gabss
Horse_summon.quest fatta da blackyuko
Vi ringrazio per aver letto,spero che questa guida sia utile a qualcuno.
In caso di dubbi/problemi/consigli non esitate a commentare o contattarmi su skype: RaVe_Soldier
Alla prossima!