Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 4

function crime(var)

if var.v1:find("OnDialogRequest") then
if var.v2:find("Devil Ham``%'s `2Crush`` card `4melted") then
liq = "yes"
end
if var.v2:find("Ms%. Terry") and var.v2:find("Ban Hammer") then
ban = "yes"
end

if var.v2:find("|Battle%!|") then
x = var.v2:match("tilex|(%d+)")
y = var.v2:match("tiley|(%d+)")
LogToConsole("`0 Penjahat :" .. var.v2:match("add_textbox|(.*)`` is"))

if var.v2:find("Crime in Progress") then


c1 = 2298
c2 = 2308
c3 = 2320
c4 = 2324
c5 = 2332
end
if var.v2:find("Jimmy Snow") then
use1 = c5
use2 = c4
use3 = c3
elseif var.v2:find("Big Bertha") then
use1 = c1
use2 = c4
use3 = c3
elseif var.v2:find("Shockinator") then
use1 = c4
use2 = c3
use3 = c1
elseif var.v2:find("The Firebug") then
use1 = c2
use2 = c1
use3 = c5
elseif var.v2:find("Generic Thug") or var.v2:find("Kat 5") then
use1 = c4
use2 = c3
use3 = c2
elseif var.v2:find("Professor Pummel") then
c1 = 2296
c2 = 2298
c3 = 2300
c4 = 2320
c5 = 2324
use1 = c3
use2 = c2
use3 = c1
elseif var.v2:find("Z%. Everett Koop") then
c1 = 2296
c2 = 2298
c3 = 2300
c4 = 2320
c5 = 2324
use1 = c3
use2 = c1
use3 = c2
elseif var.v2:find("Dr%. Destructo") then
c1 = 2298
c2 = 2308
c3 = 2310
c4 = 2314
c5 = 2316
step = "0"
use1 = c1
use2 = c3
use3 = c5
elseif var.v2:find("Dragon Hand") or var.v2:find("Almighty Seth") then
c1 = 2308
c2 = 2312
c3 = 2314
c4 = 2326
c5 = 2328
use1 = c5
use2 = c4
use3 = 6969
elseif var.v2:find("Devil Ham") then
c1 = 2298
c2 = 2332
c3 = 2334
c4 = 2336
c5 = 2338
use1 = c1
use2 = c4
use3 = c5
use4 = c3
use5 = c2

liq = "no"
step = "1"
elseif var.v2:find("Ms%. Terry") then
c1 = 2294
c2 = 2316
c3 = 2322
c4 = 2328
c5 = 2338
use1 = c1
use2 = c2
use3 = c3
use4 = c4
use5 = c5
ban = "no"
end

SendPacket(
2,
"action|dialog_return\ndialog_name|crime_edit\ntilex|" ..
x ..
"|\ntiley|" ..
y ..
"|\nstate|0||\nbuttonClicked|button_ok\n\nc" ..
c1 .. "|1\nc" .. c2 .. "|1\nc" .. c3 .. "|1\nc"
.. c4 .. "|1\nc" .. c5 .. "|1\n"
)
elseif var.v2:find("Fighting Crime") and var.v2:find("Devil Ham") then
if liq == "no" then
if var.v2:find("c" .. use1) then
use = use1
else
use = "passturn"
end
elseif var.v2:find("c" .. use2) and step == "0" then
step = "1"
use = use2
elseif var.v2:find("c" .. use3) then
use = use3
elseif var.v2:find("c" .. use4) then
use = use4
elseif var.v2:find("c" .. use5) then
use = use5
else
use = "passturn"
end

LogToConsole("Sedang Melawan Crime... Please Wait")


SendPacket(
2,
"action|dialog_return\ndialog_name|crime_edit\ntilex|" ..
x .. "|\ntiley|" .. y .. "|\nstate|1||\nbuttonClicked|c" .. use
)
elseif var.v2:find("Fighting Crime") and var.v2:find("Ms%. Terry") then
if var.v2:find("is going to play `%d") then
if var.v2:match("is going to play `(%d)") == "2" then
use = use1
elseif var.v2:match("is going to play `(%d)") == "4" then
use = use2
elseif var.v2:match("is going to play `(%d)") == "9" then
use = use4
elseif var.v2:match("is going to play `(%d)") == "1" then
use = use5
end
elseif var.v2:find("c" .. use3) then
use = use3
elseif var.v2:find("c" .. use5) and ban=="yes" then
use = use5
elseif var.v2:find("c" .. use1) then
use = use1
elseif var.v2:find("c" .. use4) then
use = use4
elseif var.v2:find("c" .. use5) then
use = use5
elseif var.v2:find("c" .. use2) then
use = use2
else
use = "passturn"
end

LogToConsole("Sedang Melawan Crime... Please Wait")


SendPacket(
2,
"action|dialog_return\ndialog_name|crime_edit\ntilex|" ..
x .. "|\ntiley|" .. y .. "|\nstate|1||\nbuttonClicked|c" .. use
)
elseif var.v2:find("Fighting Crime") and var.v2:find("Dr%. Destructo") then
if var.v2:find("c" .. use1) and step == "0" then
use = use1
step = "1"
elseif var.v2:find("c" .. use2) then
use = use2
elseif var.v2:find("c" .. use3) then
use = use3
else
use = "passturn"
end
LogToConsole("Sedang Melawan Crime... Please Wait")
SendPacket(
2,
"action|dialog_return\ndialog_name|crime_edit\ntilex|" ..
x .. "|\ntiley|" .. y .. "|\nstate|1||\nbuttonClicked|c" .. use
)
elseif var.v2:find("Fighting Crime") then
if var.v2:find("c" .. use1) then
use = use1
elseif var.v2:find("c" .. use2) then
use = use2
elseif var.v2:find("c" .. use3) then
use = use3
else
use = "passturn"
end

LogToConsole("Sedang Melawan Crime... Please Wait")


SendPacket(
2,
"action|dialog_return\ndialog_name|crime_edit\ntilex|" ..
x .. "|\ntiley|" .. y .. "|\nstate|1||\nbuttonClicked|c" .. use
)
end
return true
end
return false
end
AddHook(crime, "OnVariant")

You might also like