-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into lunalua-0.7.2.1
- Loading branch information
Showing
28 changed files
with
6,673 additions
and
132 deletions.
There are no files selected for viewing
5,393 changes: 5,393 additions & 0 deletions
5,393
LuaScriptsLibExt/Readme_For_raocoin2.lua/example.lvl
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions
37
LuaScriptsLibExt/Readme_For_raocoin2.lua/example/lunadll.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
raocoin = loadSharedAPI("raocoin2"); | ||
rc = raocoin.registerCurrency(274, true, 472, 66); | ||
coins = raocoin.registerMemCurrency(0x00B2C5A8,FIELD_WORD,true,false,0,0,"coins.png"); | ||
|
||
local shop = {} | ||
|
||
shop["mushroom"] = { npc = 9, item = rc:addItem(2,function() triggerEvent("BuyMushroom"); end,true), x = -199904, y=-200164}; | ||
shop["fire"] = { npc = 183, item = rc:addItem(4,function() triggerEvent("BuyFire"); end,true), x = -199776, y=-200164}; | ||
shop["ice"] = { npc = 277, item = rc:addItem(6,function() triggerEvent("BuyIce"); end,true), x = -199648, y=-200164}; | ||
shop["leaf"] = { npc = 34, item = rc:addItem(10,function() triggerEvent("BuyLeaf"); end,true), x = -199520, y=-200164}; | ||
shop["tanuki"] = { npc = 169, item = rc:addItem(20,function() triggerEvent("BuyTanuki"); end,true), x = -199392, y=-200164}; | ||
shop["hammer"] = { npc = 170, item = rc:addItem(20,function() triggerEvent("BuyHammer"); end,true), x = -199264, y=-200164}; | ||
shop["1up"] = { npc = 187, item = rc:addItem(1,function() spawnNPC(187,player.x,player.y,player.section); end,false), x = -199072, y=-200164}; | ||
shop["3up"] = { npc = 188, item = rc:addItem(3,function() spawnNPC(188,player.x,player.y,player.section); end,false), x = -198944, y=-200164}; | ||
shop["random"] = { npc = 287, item = rc:addItem(3,function() spawnNPC(287,player.x,player.y,player.section); end,false), x = -198816, y=-200164}; | ||
shop["coins"] = { npc = 10, item = rc:addItem(1,function() for i = 1,25,1 do spawnNPC(10,player.x,player.y,player.section); end end,false), x = -198698, y=-200164}; | ||
shop["random2"] = { npc = 287, item = coins:addItem(50,function() spawnNPC(287,player.x,player.y,player.section); end,false), x = -198442, y=-200164}; | ||
|
||
function onLoad() | ||
for k,v in pairs(shop) do | ||
v.item:placeToken(v.x,v.y,0,v.npc); | ||
end | ||
end | ||
|
||
function raocoin.onCollect(currency) | ||
if(currency.id == 0x00B2C5A8) then | ||
currency:save(); | ||
end | ||
end | ||
|
||
function onEvent(name) | ||
if(name == "UndoBuys") then | ||
for k,v in pairs(shop) do | ||
v.item:undoBuy(); | ||
end | ||
end | ||
end |
Oops, something went wrong.