Yoko

All sides of Injection
It is currently 2025-12-20 14:02:59

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Hunger Skript
PostPosted: 2008-02-28 12:13:26 
Offline
User avatar

Joined: 2007-02-19 05:38:54
Posts: 16
Location: Riga
Kak napisatj skript na hunger esle piwu v igre
.hunger pokazivaetsa skoka kakoi edi mne nada

Vitamins! 100
Kallories! 97
Hungry! 80
Water! 60

primerno tak pokazivaet nada skript 4tobi esle menjwe 80 kakoito iz etih ingredietov kuwal edu a esle boljwe 100 uze 4tobi ne4e nekuwal delal pauzu

pomogite skriptom =]

Type=0x0978 ; Eda

_________________
"Player OldparadiseXL"


Top
   
 Post subject:
PostPosted: 2008-02-28 12:45:45 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Code:
Sub specialEat()
var food = "0x0978"
var msg_1 = "Vitamins!"
var msg_2 = "Kallories!"
var msg_3 = "Hungry!"
var msg_4 = "Water!"
var flag1 = false
var flag2 = false
uo.deletejournal()
uo.msg( ".hunger" )
checklag()
msg1 = val( explode( uo.Journal( uo.inJournal( msg1 ) ), ' ', 1 ) )
msg2 = val( explode( uo.Journal( uo.inJournal( msg2 ) ), ' ', 1 ) )
msg3 = val( explode( uo.Journal( uo.inJournal( msg3 ) ), ' ', 1 ) )
msg4 = val( explode( uo.Journal( uo.inJournal( msg4 ) ), ' ', 1 ) )
if msg1 > 100 || msg2 > 100 || msg3 > 100 || msg4 > 100 then
    flag1 = true
endif
if msg1 < 80 || msg2 < 80 || msg3 < 80 || msg4 < 80 then
    flag2 = true
endif
if ( not flag1 ) and flag2 then
    uo.usetype( food )
end_if
endsub


Наверное зря я решил сэкономить на массивах.. )

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited