• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

quest w podłodze

experienced

Intermediate OT User
Joined
Jan 13, 2011
Messages
418
Reaction score
102
Location
Poland
Witam
Używam tfa 0.3.4pl2 8.41/42 i na nim nie dziala quest w podłodze czyli dawanie unique czy tam actionid do tile bo go nie wykrywa ale po dokompilowaniu tego
if(thing == NULL){
thing = tile->ground;
}
juz dzialal quest z podlogi tylko ze sie reszta spieprzyla bo nie moglem otwierac deda potworow i robic questów ze skrzynek itp bo not possible bylo ;/
jak temu zaradzić?
 
Witam
Używam tfa 0.3.4pl2 8.41/42 i na nim nie dziala quest w podłodze czyli dawanie unique czy tam actionid do tile bo go nie wykrywa ale po dokompilowaniu tegojuz dzialal quest z podlogi tylko ze sie reszta spieprzyla bo nie moglem otwierac deda potworow i robic questów ze skrzynek itp bo not possible bylo ;/
jak temu zaradzić?

jak zaradzić ? - pokaż trochę więcej kodu, gdzie to tam dodałeś itp.
 
Jak musisz to wklej, nie będziemy się gniewać.
 
tam wiecie miśki caly game.cpp nie wejdzie ale wklepuje tutaj to:
Code:
case STACKPOS_USEITEM:
			{
				Item* item = tile->getItemByTopOrder(2);
				if(!item || !g_actions->hasAction(item))
				{
					if(!(thing = tile->getTopDownItem()))
						thing = tile->getTopTopItem();
				}
				
				if(thing == NULL){
						thing = tile->ground;
					}
				else
					thing = item;

				break;
			}
 
PHP:
case STACKPOS_USEITEM:
{
	Item* item = tile->getItemByTopOrder(2);
    if(!item || !g_actions->hasAction(item))
    {
		// if(!(thing = tile->getTopDownItem()))
			// thing = tile->getTopTopItem();
		thing = tile->ground;
    }
    else
        thing = item;

    break;
}
 
Może by użyć jakiś niewidzialny przedmiot do tego?
 
Są takie przedmioty w Tibii, które nie mają grafiki - po prostu są niewidoczne, niektóre działają jak blokady - nie wolno ich ruszać, ale raczej wolno je używać. Po prostu dać do tego actions, i tam sprawdzać pozycje etc.
 
aha takie buty :)
tylko ze wtedy nie bede mogl na ta plytke stanac bo blokuje :[
 
Last edited:
Code:
case STACKPOS_USEITEM:
			{
				thing = tile->getTopDownItem();
				Item* item = tile->getItemByTopOrder(2);
				if(item && g_actions->hasAction(item))
				{
					const ItemType& it = Item::items[item->getID()];
					if(!thing || (!it.hasHeight && !it.allowPickupable))
						thing = item;
				}

				if(!thing)
					thing = tile->getTopTopItem();

				if(!thing)
					thing = tile->ground;

				break;
			}

			default:
				thing = tile->__getThing(index);
				break;
 
aha i jeszcze mam takie pytanie ale juz nie chcialem zakladac nowego tematu
co trzeba zrobic pod 8.42 w 0.3.4 zeby wyswietlalo ile bijesz w potworka w oknie default czyli You deal xxx damage to a xxx tak jak w wyzszych wersjach tibii :)
z gory dzieki
tak w player.cpp kombinuje powinno dzialac ale blad przy kompilacji:
Code:
void Player::onAttackedCreatureDrainHealth(Creature* target, int32_t points)
{
	Creature::onAttackedCreatureDrainHealth(target, points);
	if(getParty() && target && !target->getPlayer() && (!target->getMaster() || !target->getMaster()->getPlayer()))
	{
		Monster* tmpMonster = target->getMonster();
		if(tmpMonster && tmpMonster->isHostile()) //We have fulfilled a requirement for shared experience
			getParty()->addPlayerDamageMonster(this, points);
			
			char buffer[100];
	sprintf(buffer, "You deal %d damage to %s.", points, target->getNameDescription().c_str());
	sendTextMessage(MSG_STATUS_DEFAULT, buffer);
}

void Player::onSummonAttackedCreatureDrain(Creature* summon, Creature* target, int32_t points)
{
	Creature::onSummonAttackedCreatureDrain(summon, target, points);

	char buffer[100];
	sprintf(buffer, "Your %s deals %d damage to %s.", summon->getName().c_str(), points, target->getNameDescription().c_str());
	sendTextMessage(MSG_EVENT_DEFAULT, buffer);
}
	}
}
 
Last edited:
Back
Top