Unmantained Guida [RELEASE]Oroscopo

Una guida contrassegnata come Unmantained contiene informazioni su un argomento obsoleto, non più utile o files non aggiornati da parte del creatore.
Stato
Discussione chiusa ad ulteriori risposte.

Superisi

Utente Electrum
7 Agosto 2010
412
17
53
151
Ho creato questo npc per rispondere a duna domanda.

allora create 3 file nominateli change_empire.start.0.arg .script e .when
nella .arg mettete
PHP:
"Oroscopo By Superisi"
nella .script mettete
PHP:
if 86400 > get_global_time ( ) - pc . getqf ( "tempo" ) then
say ( "Puoi leggere una sola volta al" )
say ( "giorno l'oroscopo." )
return
end
local tit = 'Oroscopo By Superisi'
local num = tonumber (number(1,5))
say_title ( "" .. tit .. "" )
say ( "Vuoi leggere il tuo oroscopo" )
say ( "di oggi?" )
say_reward ( "Ti costerà 500.000 yang" )
local a = select ( "Si" , "No" )
if a == 2 then
elseif a == 1 then
if pc . gold < 500000 then
say ( "Non hai abbastanza yang." )
else
pc . setqf ( "oroscopo" , 1 )
pc . setqf ( "tempo" , get_global_time ( ) )
pc . changegold ( - 500000 )
say_title ( "" .. tit .. "" )
if num == 1 then
say ( "C'è il fabbro nuovo!!!" )
say ( "Corri da lui finche puoi." )
pc . setqf ( "fortuna" , 1 )
elseif num == 2 then
say ( "La bottegaia ha lasciato il" )
say ( "fabbro, non potenzierei il" )
say ( "tuo equipaggiamento se fossi" )
say ( "in te." )
pc . setqf ( "fortuna" , 2 )
elseif num == 3 then
say ( "Le stelle ti appoggiano e ti" )
say ( "aiuteranno a potenziare il tuo" )
say ( "equipaggiamento." )
pc . setqf ( "fortuna" , 3 )
elseif num == 4 then
say ( "Il Dio Drago si è stufato" )
say ( "di benedirti tutte le volte" )
say ( "che crepi, e ti maledice." )
pc . setqf ( "fortuna" , 4 )
elseif num == 5 then
say ( "Le tue abilità fanno schifo." )
say ( "Il Dio Drago ti manda " )
say ( "af*******." )
pc . setqf ( "fortuna" , 5 )
return
end
return
end
return
end
il .when lo lasciate vuoto

ora passiamo al fabbro ne ho dovuto fare 1 a parte
create altri 3 file change_empire.start.1.arg .script .when
nel .arg metti
PHP:
"Fabbro Dell'Oroscopo"
nel .script
PHP:
if 86400 < get_global_time ( ) - pc . getqf ( "tempo1" ) then
say ( "Reset, Please wait..." )
pc . setqf ( "tempo1" , get_global_time ( ) )
pc . setqf ( "poss" , 0 )
wait ( )
return
end
local item1 = tonumber(number(1,10))
local tit = 'Fabbro Oroscopo'
say_title ( "" .. tit .. "" )
say ( "Ciao io sono un fabbro speciale." )
say ( "Vuoi uppare qualche item?" )
say ( "" )
local a = select ( "Si" , "Vantaggi" , "No" )
if a == 3 then
elseif a == 2 then
say_title ( "" .. tit .. "" )
say_reward ( "-Sono totalmente GRATIS" )
say_reward ( "-Non richiedo Item" )
say_reward ( "-% di up variabile per qualsiasi" )
say_reward ( "item.Esempio:" )
say ( "Spada da +1 a +2 70%" )
say ( "Rinata da +8 a +9 70%" )
say_reward ( "-Puoi fare 3 up al giorno" )
elseif a == 1 then
if pc . getqf ( "poss" ) > 2 then
say ( "Non puoi piu uppare" )
say ( "per oggi." )
return
end
pc . setqf ( "tempo1" , get_global_time ( ) )
pc . setqf ( "poss" , pc . getqf ( "poss" ) + 1 )
say_title ( "" .. tit .. "" )
say ( "Inserisci il value dell'item" )
say ( "che vuoi uppare:" )
local item = tonumber(input(""))
if pc . count_item ( item ) < 1 then
say ( "Non hai l'item." )
else
say_title ( "" .. tit .. "" )
if pc . getqf ( "fortuna" ) == 1 then
say_reward ( "% di successo: 60" )
if item1 <= 6 then
pc . remove_item ( item , 1 )
pc . give_item2 ( item + 1 , 1 )
chat ( "Miglioramento Riuscito Con Sucesso" )
else
pc . remove_item ( item , 1 )
chat ( "Miglioramento Fallito" )
return
end
elseif pc . getqf ( "fortuna" ) == 2 then
say_reward ( "% di successo: 40" )
if item1 <= 4 then
pc . remove_item ( item , 1 )
pc . give_item2 ( item + 1 , 1 )
chat ( "Miglioramento Riuscito Con Sucesso" )
else
pc . remove_item ( item , 1 )
chat ( "Miglioramento Fallito" )
return
end
elseif pc . getqf ( "fortuna" ) == 3 then
say_reward ( "% di successo: 70" )
if item1 <= 7 then
pc . remove_item ( item , 1 )
pc . give_item2 ( item + 1 , 1 )
chat ( "Miglioramento Riuscito Con Sucesso" )
else
pc . remove_item ( item , 1 )
chat ( "Miglioramento Fallito" )
return
end
elseif pc . getqf ( "fortuna" ) == 4 then
say_reward ( "% di successo: 30" )
if item1 <= 3 then
pc . remove_item ( item , 1 )
pc . give_item2 ( item + 1 , 1 )
chat ( "Miglioramento Riuscito Con Sucesso" )
else
pc . remove_item ( item , 1 )
chat ( "Miglioramento Fallito" )
return
end
elseif pc . getqf ( "fortuna" ) == 5 then
say_reward ( "% di successo: 20" )
if item1 <= 2 then
pc . remove_item ( item , 1 )
pc . give_item2 ( item + 1 , 1 )
chat ( "Miglioramento Riuscito Con Sucesso" )
else
pc . remove_item ( item , 1 )
chat ( "Miglioramento Fallito" )
return
end
return
end
return
end
return
end
e nel .when
PHP:
return pc . getqf ( "oroscopo" ) == 1
poi i 6 file vanno inseriti via FTP nel percorso usr/rain/channel/share_data/locale/hongkong/quest/object/valuenpc/chat(se non c'è la create)

spero di essere stato abbastanza chiaro e spero soprattutto ke vi piaccia
 
forse non hai tenuto conto delle pietre, bonus dell arma vero? quindi se tieni una spada +8 tutta pietrata e bonussata diventa una +9 liscia .-.
 
Ultima modifica:
ma qst si collega con le % del fabbro creato ( =
local item1 = tonumber(number(1,10)) <--- con questo si collega che è diverso :asd:, altro che percentuale fabbro :D kmq bravo dai non male..

Apparte il fatto che perdi item pietrato e bonussato se usi quel fabbro ma per altre cose potrebbe ritornare utile ai player
 
Stato
Discussione chiusa ad ulteriori risposte.
Indietro
Top Bottom