Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 16.04.2007, 11:08   #1
moon
Архивный участник
 
Join Date: Jul 2006
Posts: 66
Default quest fuction

Hallo all can any on explane me this 2 line's, i work on some quests.

Code:
( myself->GetInventoryInfo(talker,1) * 0.800000 )
AND
Code:
talker.flag = ( gg->Rand(2) + 1 );


thanks
moon is offline  
Old 16.04.2007, 15:00   #2
ateh
Архивный участник
 
Join Date: Apr 2006
Posts: 118
Default

First one along with 3 other GetInventoryInfo calls is used to check if player has less than 80% of weight used and less than 80% of max items in inventory allowed - means if he has room for quest items which he might get.

The flag one I'm not sure, probably to decide if he should get quest item this time or not. Show more code.
ateh is offline  
Old 17.04.2007, 10:02   #3
moon
Архивный участник
 
Join Date: Jul 2006
Posts: 66
Default

Tanks for helping me ! can you give lil more Detail ? thanks
Code:
		if( ask == 996 )
		{
			myself->SetCurrentQuestID(996);
			if( myself->GetInventoryInfo(talker,0) >= ( myself->GetInventoryInfo(talker,1) * 0.800000 ) || myself->GetInventoryInfo(talker,2) >= ( myself->GetInventoryInfo(talker,3) * 0.800000 ) )

Code:
						if( talker.flag == 1 )
						{
							if( ( myself->GetCurrentTick() - talker.quest_last_reward_time ) > 1 )
moon is offline  
Old 17.04.2007, 14:56   #4
ateh
Архивный участник
 
Join Date: Apr 2006
Posts: 118
Default

Whole this 'if' line is for checking inventory weight and amount as I said, if condition is TRUE then code under it gets executed (usually send message to player that he needs less weight and items) and execution of handler is terminated.
Second part if still not long enough to say what it exactly does. But seems like deciding if he get's quest item.
ateh is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 22:46.