[SCRIPT] Magazzino Pozze portatile

Pazzoid

Utente Normale
Autore del topic
30 Giugno 2009
71
0
Miglior risposta
0
Ecco a voi un piccolo script che feci tempo fa... per molti è una cosa molto banale e la reputerà anche inutile ma ad alcuni potrebbe interessare.

Si tratta di un contenitore di pozze in grado di contenere fino a 50 pacchi da 200 pozze l'uno , 50 pacchi equivalgono a più di un inventario di pozze
:emoji_smiley:


say_title("Contenitore di pozze")
say ("Attualmente hai a disposizione " , pc . getqf ("pozze") , " pacchi")
say ("Cosa desideri fare?")
local a = select ("Ritirare pozze" , "Desidero immagazzinare pozze" , "Chiudi")
if a == 3 then
return
elseif a == 1 then
if pc . getqf ("pozze") >= 1 then
say_title("Contenitore di pozze")
say ("Attualmente hai a disposizione " , pc . getqf ("pozze") , " pacchi")
say ("Quanti pacchi desideri ritirare?")
local b = select ("1 pacco da 200" , "5 pacchi da 200" , "10 pacchi da 200" , "Chiudi")
if b == 1 then
if pc . getqf ("pozze") >= 1 then
pc . give_item2 ( "27003" , 200)
pc.setqf ("pozze" , pc . getqf ("pozze") - 1)
else
say("Non hai pacchi a disposizione!!")
end
elseif b == 2 then
if pc . getqf ("pozze") >= 5 then
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc.setqf ("pozze" , pc . getqf ("pozze") - 5)
else
say ("Non hai abbastanza pacchi a disposizione!")
end
elseif b == 3 then
if pc . getqf ("pozze") >= 10 then
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc.setqf ("pozze" , pc . getqf ("pozze") - 10)
else
say ("Non hai abbastanza pacchi a disposizione!")
end
end
end
elseif a == 2 then
if pc . getqf ("pozze") <= 50 then
say_title("Contenitore di pozze")
say ("Attualmente hai a disposizione " , pc . getqf ("pozze") , " pacchi")
say ("Quanti pacchi desideri immagazzinare?")
local c = select ("1 pacco" , "5 pacchi" , "10 pacchi" , "Chiudi" )

if c == 1 then
if pc . count_item ( 27003 ) >= 200 and pc . getqf ("pozze") <= 49 then
pc . remove_item ( "27003" , 200)
pc.setqf ("pozze" , pc . getqf ("pozze") + 1)
else
say("Non è possibile eseguire l'operazione.")
end
elseif c == 2 then
if pc . count_item ( 27003 ) >= 1000 and pc . getqf ("pozze") <= 45 then
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc.setqf ("pozze" , pc . getqf ("pozze") + 5)
else
say("Non è possibile eseguire l'operazione.")
end
elseif c == 3 then

if pc . count_item ( 27003 ) >= 2000 and pc . getqf ("pozze") <= 40 then
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc.setqf ("pozze" , pc . getqf ("pozze") + 10)
else
say("Non è possibile eseguire l'operazione.")
end
end
else
say ("Il magazzino è pieno!!")
end
end

Guida su come implementare ( per chi non lo sa fare )

Collegatevi a WinSCP
1) Andate nella cartella Object (il percorso varia in base ai file ad esempio : /usr/home/game/share/locale/germany/quest/object
2) Decidete su quale item montare il magazzino portatile quindi andate sulla cartella avente il value dell'item scelto (es : anello del teletrasporto 70007)
3) Creare la cartella nel caso in cui non esistesse chiamandola "use" poi all'interno fare un nuovo file e chiamarlo forked_road.start ed inserire lo script.
4) Subito dopo andare nell'item proto su navicat e modificare il type dell'item mettendo 18 ( nel caso in cui non fosse già settato)



Per chi invece volesse un pannello senza item ecco a voi :

quest pozze begin
state start begin
when login or levelup or enter with pc.get_level() > 0 begin
set_state( pannello )
end
end
state pannello begin
when letter begin
send_letter("Magazzino pozze")
end
when button or info begin
say_title("Magazzino pozze")
set_state( pannello )

say ("Attualmente hai a disposizione " , pc . getqf ("pozze") , " pacchi")
say ("Cosa desideri fare?")
local a = select ("Ritirare pozze" , "Desidero immagazzinare pozze" , "Chiudi")
if a == 3 then
return
elseif a == 1 then
if pc . getqf ("pozze") >= 1 then
say_title("Contenitore di pozze")
say ("Attualmente hai a disposizione " , pc . getqf ("pozze") , " pacchi")
say ("Quanti pacchi desideri ritirare?")
local b = select ("1 pacco da 200" , "5 pacchi da 200" , "10 pacchi da 200" , "Chiudi")
if b == 1 then
if pc . getqf ("pozze") >= 1 then
pc . give_item2 ( "27003" , 200)
pc.setqf ("pozze" , pc . getqf ("pozze") - 1)
else
say("Non hai pacchi a disposizione!!")
end
elseif b == 2 then
if pc . getqf ("pozze") >= 5 then
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc.setqf ("pozze" , pc . getqf ("pozze") - 5)
else
say ("Non hai abbastanza pacchi a disposizione!")
end
elseif b == 3 then
if pc . getqf ("pozze") >= 10 then
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc . give_item2 ( "27003" , 200)
pc.setqf ("pozze" , pc . getqf ("pozze") - 10)
else
say ("Non hai abbastanza pacchi a disposizione!")
end
end
end
elseif a == 2 then
if pc . getqf ("pozze") <= 50 then
say_title("Contenitore di pozze")
say ("Attualmente hai a disposizione " , pc . getqf ("pozze") , " pacchi")
say ("Quanti pacchi desideri immagazzinare?")
local c = select ("1 pacco" , "5 pacchi" , "10 pacchi" , "Chiudi" )

if c == 1 then
if pc . count_item ( 27003 ) >= 200 and pc . getqf ("pozze") <= 49 then
pc . remove_item ( "27003" , 200)
pc.setqf ("pozze" , pc . getqf ("pozze") + 1)
else
say("Non è possibile eseguire l'operazione.")
end
elseif c == 2 then
if pc . count_item ( 27003 ) >= 1000 and pc . getqf ("pozze") <= 45 then
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc.setqf ("pozze" , pc . getqf ("pozze") + 5)
else
say("Non è possibile eseguire l'operazione.")
end
elseif c == 3 then

if pc . count_item ( 27003 ) >= 2000 and pc . getqf ("pozze") <= 40 then
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc . remove_item ( "27003" , 200)
pc.setqf ("pozze" , pc . getqf ("pozze") + 10)
else
say("Non è possibile eseguire l'operazione.")
end
end
else
say ("Il magazzino è pieno!!")
end
end
end
end
end

Guida su come attivarlo sul proprio server :

Parte WinSCP

1) Andare nella cartella quest
2) Creare nuovo file e chiamarlo pozze.quest
3) Incollare la quest e salvare

Parte SSH

1) Andare su putty/virtual pc/virtual box
2) Digitare il percorso fino a /quest
3) Scrivere ./qc pozze.quest


Download script item :
Perfavore, Entra oppure Registrati per vedere i Link!

Download quest (con la pergamena) :
Perfavore, Entra oppure Registrati per vedere i Link!

Qualche immagine ;)

wlewkm.png



Enjoy :banana2: