What's new

Actions Item usuwaj?cy Red/Black skull

Status
Not open for further replies.

Gesior.pl

Ten G?sior
Joined
Apr 23, 2008
Messages
88
Reaction score
19
Jako, ?e w Gesior Account Maker 2012 nie ma opcji 'remove red skull' w SMS Shop, skrypt ten mo?e by? przydatny na wielu OTS.
U?ywaj?c nowego AAC nale?y sprzedawa? item kt?rego u?ycie usuwa red/black skull graczowi. Na forach jest masa starych skrypt?w z b??dem takim, ?e po relog lub zabiciu jednej osoby red skull wraca.
To jest skrypt dla silnika TFS 0.3.6, ale powinien dzia?a? bez problemu na TFS 0.3.7 i wszystkich 0.4:
Code:
function onUse(cid, item, frompos, item2, topos)
	local skull = getCreatureSkullType(cid) 
	local bad_skulls = {SKULL_RED,SKULL_BLACK}
	if(isInArray(bad_skulls, skull)) then
		doPlayerSetSkullEnd(cid, 0, skull)
		doRemoveItem(item.uid, 1)
		db.executeQuery('UPDATE `killers`, `player_killers` SET `killers`.`unjustified` = 0 WHERE `killers`.`unjustified` = 1 AND `player_killers`.`player_id` = ' .. getPlayerGUID(cid) .. ' AND `killers`.`id` = `player_killers`.`kill_id`')
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your skull has been removed!")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have red/black skull!")
	end
	return true
end
Teraz wystarczy to przypisa? w actions.xml do jakiego? itema i gotowe.
 
Status
Not open for further replies.
Top