Double
03-28-2009, 07:06 PM
============
===Credits=====
============
Created by Mircast---
~~[[Credits: Sandile for the Idea]]
============
==Screenshots==
============
http://img27.imageshack.us/img27/7780/lol1m.jpg (http://img27.imageshack.us/my.php?image=lol1m.jpg)
http://img27.imageshack.us/img27/lol1m.jpg/1/w687.png (http://g.imageshack.us/img27/lol1m.jpg/1/)
http://img7.imageshack.us/img7/7510/lol2g.jpg (http://img7.imageshack.us/my.php?image=lol2g.jpg)
http://img7.imageshack.us/img7/lol2g.jpg/1/w687.png (http://g.imageshack.us/img7/lol2g.jpg/1/)
http://img27.imageshack.us/img27/6864/lol4y.jpg (http://img27.imageshack.us/my.php?image=lol4y.jpg)
http://img27.imageshack.us/img27/lol4y.jpg/1/w687.png (http://g.imageshack.us/img27/lol4y.jpg/1/)
http://img27.imageshack.us/img27/3955/lol5s.jpg (http://img27.imageshack.us/my.php?image=lol5s.jpg)
http://img27.imageshack.us/img27/lol5s.jpg/1/w687.png (http://g.imageshack.us/img27/lol5s.jpg/1/)
============
=Intallation Guide=
============
1. Execute this SQL into your "world" database
insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`)
values ('98231', "Bananas", "Gambler", '', '0', '1', '0', '0', '0', '0', '21362', '0', '0', '0', '1', '1', '0', '0');
insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`)
values ('98231', '84', '84', '35', '1', '1', '0', '1', '1', '1900', '0', '100', '200', '0', '0', '0', '0', '3600000', '1', '0', '0', '0', '0', '0', '0', '0', '0', "0", '0', '0', '0', '0', '2.50', '8.00', '14.00', '0', '0', '0', '0', '0', '0', '0');
2. Put this LUA file in your "scripts" folder.
function On_Gossip(unit, event, player)
unit:RemoveEvents()
if (player:IsInCombat() == true) then
player:SendAreaTriggerMessage("Sorry, you have to leave combat first!")
else
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(5, "[Bet 1 Coin]", 1, 0)
unit:GossipMenuAddItem(5, "[Bet 2 Coins]", 2, 0)
unit:GossipMenuAddItem(5, "[Bet 5 Coins]", 3, 0)
unit:GossipSendMenu(player)
end
end
function Gossip_Submenus(unit, event, player, id, intid, code)
if (intid == 7) then
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(5, "[Bet 1 Coin]", 1, 0)
unit:GossipMenuAddItem(5, "[Bet 2 Coins]", 2, 0)
unit:GossipMenuAddItem(5, "[Bet 5 Coins]", 3, 0)
unit:GossipSendMenu(player)
end
if (intid == 3) then
if (player:GetItemCount(ITEMID) < 5) then
player:SendAreaTriggerMessage("You don't have enough coins to bet!")
else
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(4, "Bet 5 Coins", 8, 0)
unit:GossipMenuAddItem(4, "[BACK]", 7, 0)
unit:GossipSendMenu(player)
end
end
if (intid == 8) then
Choice=math.random(1, 4)
if Choice==1 then
player:SendAreaTriggerMessage("You won (5) Coins! You gambling whore!")
unit:FullCastSpellOnTarget(33082, player)
unit:FullCastSpellOnTarget(33081, player)
unit:FullCastSpellOnTarget(33077, player)
unit:FullCastSpellOnTarget(33078, player)
unit:FullCastSpellOnTarget(33079, player)
unit:FullCastSpellOnTarget(33080, player)
player:AddItem(ITEMID, 5)
end
if Choice==2 then
player:SendAreaTriggerMessage("You lost (5) Coins, better luck next time!")
player:RemoveItem(ITEMID, 5)
end
if Choice==3 then
player:SendAreaTriggerMessage("You lost (5) Coins, better luck next time!")
player:RemoveItem(ITEMID, 5)
end
if Choice==4 then
player:SendAreaTriggerMessage("You lost (5) Coins, better luck next time!")
player:RemoveItem(ITEMID, 5)
end
end
if (intid == 1) then
if (player:GetItemCount(ITEMID) < 1) then
player:SendAreaTriggerMessage("You don't have enough coins to bet!")
else
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(4, "Bet 1 Coin", 5, 0)
unit:GossipMenuAddItem(4, "[BACK]", 7, 0)
unit:GossipSendMenu(player)
end
end
if (intid == 5) then
Choice=math.random(1, 2)
if Choice==1 then
player:SendAreaTriggerMessage("You won (1) Coin!")
player:AddItem(ITEMID, 1)
end
if Choice==2 then
player:SendAreaTriggerMessage("You lost (1) Coin, better luck next time!")
player:RemoveItem(ITEMID, 1)
end
end
if (intid == 2) then
if (player:GetItemCount(ITEMID) < 2) then
player:SendAreaTriggerMessage("You do not have enough coins to bet!")
else
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(4, "Bet 2 Coins", 6, 0)
unit:GossipMenuAddItem(4, "[BACK]", 7, 0)
unit:GossipSendMenu(player)
end
end
if (intid == 6) then
Choice=math.random(1, 2)
if Choice==1 then
player:SendAreaTriggerMessage("You won (2) Coins!")
player:AddItem(ITEMID, 2)
end
if Choice==2 then
player:SendAreaTriggerMessage("You lost (2) Coins, better luck next time!")
player:RemoveItem(ITEMID, 2)
end
end
RegisterUnitGossipEvent(98231 1, "On_Gossip")
RegisterUnitGossipEvent(98231 2, "Gossip_Submenus")
Entry ID:98231
This is something I found on MMoWned
===Credits=====
============
Created by Mircast---
~~[[Credits: Sandile for the Idea]]
============
==Screenshots==
============
http://img27.imageshack.us/img27/7780/lol1m.jpg (http://img27.imageshack.us/my.php?image=lol1m.jpg)
http://img27.imageshack.us/img27/lol1m.jpg/1/w687.png (http://g.imageshack.us/img27/lol1m.jpg/1/)
http://img7.imageshack.us/img7/7510/lol2g.jpg (http://img7.imageshack.us/my.php?image=lol2g.jpg)
http://img7.imageshack.us/img7/lol2g.jpg/1/w687.png (http://g.imageshack.us/img7/lol2g.jpg/1/)
http://img27.imageshack.us/img27/6864/lol4y.jpg (http://img27.imageshack.us/my.php?image=lol4y.jpg)
http://img27.imageshack.us/img27/lol4y.jpg/1/w687.png (http://g.imageshack.us/img27/lol4y.jpg/1/)
http://img27.imageshack.us/img27/3955/lol5s.jpg (http://img27.imageshack.us/my.php?image=lol5s.jpg)
http://img27.imageshack.us/img27/lol5s.jpg/1/w687.png (http://g.imageshack.us/img27/lol5s.jpg/1/)
============
=Intallation Guide=
============
1. Execute this SQL into your "world" database
insert into `creature_names` (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`)
values ('98231', "Bananas", "Gambler", '', '0', '1', '0', '0', '0', '0', '21362', '0', '0', '0', '1', '1', '0', '0');
insert into `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `can_ranged`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`, `spell1`, `spell2`, `spell3`, `spell4`, `spell_flags`, `modImmunities`)
values ('98231', '84', '84', '35', '1', '1', '0', '1', '1', '1900', '0', '100', '200', '0', '0', '0', '0', '3600000', '1', '0', '0', '0', '0', '0', '0', '0', '0', "0", '0', '0', '0', '0', '2.50', '8.00', '14.00', '0', '0', '0', '0', '0', '0', '0');
2. Put this LUA file in your "scripts" folder.
function On_Gossip(unit, event, player)
unit:RemoveEvents()
if (player:IsInCombat() == true) then
player:SendAreaTriggerMessage("Sorry, you have to leave combat first!")
else
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(5, "[Bet 1 Coin]", 1, 0)
unit:GossipMenuAddItem(5, "[Bet 2 Coins]", 2, 0)
unit:GossipMenuAddItem(5, "[Bet 5 Coins]", 3, 0)
unit:GossipSendMenu(player)
end
end
function Gossip_Submenus(unit, event, player, id, intid, code)
if (intid == 7) then
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(5, "[Bet 1 Coin]", 1, 0)
unit:GossipMenuAddItem(5, "[Bet 2 Coins]", 2, 0)
unit:GossipMenuAddItem(5, "[Bet 5 Coins]", 3, 0)
unit:GossipSendMenu(player)
end
if (intid == 3) then
if (player:GetItemCount(ITEMID) < 5) then
player:SendAreaTriggerMessage("You don't have enough coins to bet!")
else
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(4, "Bet 5 Coins", 8, 0)
unit:GossipMenuAddItem(4, "[BACK]", 7, 0)
unit:GossipSendMenu(player)
end
end
if (intid == 8) then
Choice=math.random(1, 4)
if Choice==1 then
player:SendAreaTriggerMessage("You won (5) Coins! You gambling whore!")
unit:FullCastSpellOnTarget(33082, player)
unit:FullCastSpellOnTarget(33081, player)
unit:FullCastSpellOnTarget(33077, player)
unit:FullCastSpellOnTarget(33078, player)
unit:FullCastSpellOnTarget(33079, player)
unit:FullCastSpellOnTarget(33080, player)
player:AddItem(ITEMID, 5)
end
if Choice==2 then
player:SendAreaTriggerMessage("You lost (5) Coins, better luck next time!")
player:RemoveItem(ITEMID, 5)
end
if Choice==3 then
player:SendAreaTriggerMessage("You lost (5) Coins, better luck next time!")
player:RemoveItem(ITEMID, 5)
end
if Choice==4 then
player:SendAreaTriggerMessage("You lost (5) Coins, better luck next time!")
player:RemoveItem(ITEMID, 5)
end
end
if (intid == 1) then
if (player:GetItemCount(ITEMID) < 1) then
player:SendAreaTriggerMessage("You don't have enough coins to bet!")
else
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(4, "Bet 1 Coin", 5, 0)
unit:GossipMenuAddItem(4, "[BACK]", 7, 0)
unit:GossipSendMenu(player)
end
end
if (intid == 5) then
Choice=math.random(1, 2)
if Choice==1 then
player:SendAreaTriggerMessage("You won (1) Coin!")
player:AddItem(ITEMID, 1)
end
if Choice==2 then
player:SendAreaTriggerMessage("You lost (1) Coin, better luck next time!")
player:RemoveItem(ITEMID, 1)
end
end
if (intid == 2) then
if (player:GetItemCount(ITEMID) < 2) then
player:SendAreaTriggerMessage("You do not have enough coins to bet!")
else
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(4, "Bet 2 Coins", 6, 0)
unit:GossipMenuAddItem(4, "[BACK]", 7, 0)
unit:GossipSendMenu(player)
end
end
if (intid == 6) then
Choice=math.random(1, 2)
if Choice==1 then
player:SendAreaTriggerMessage("You won (2) Coins!")
player:AddItem(ITEMID, 2)
end
if Choice==2 then
player:SendAreaTriggerMessage("You lost (2) Coins, better luck next time!")
player:RemoveItem(ITEMID, 2)
end
end
RegisterUnitGossipEvent(98231 1, "On_Gossip")
RegisterUnitGossipEvent(98231 2, "Gossip_Submenus")
Entry ID:98231
This is something I found on MMoWned