//===== rAthena Script =======================================
//= Disguise Event
//===== By: ==================================================
//= GmOcean
//===== Current Version: =====================================
//= 5.1
//===== Compatible With: =====================================
//Warp to Town!
quiz_01,233,273,5 script Prontera Warp 859,{
delwaitingroom "Prontera Warp";
waitingroom "Warp to Prontera!",0;
mes "[Warper]";
mes "Want to go back to town? Are you sure?!";
next;
menu "Yes.",y_yes,"No.",n_no;
y_yes:
mes "[Warper]";
mes "Alright lets go!";
next;
warp "prontera",156,191;
close;
n_no:
mes "[Warper]";
mes "Alright, enjoy the event!";
close;
}
//--------------------------------------------------
prontera,156,175,0 warp disevent 2,2,quiz_01,236,271
//--------------------------------------------------
//= rAthena SVN
//===== Additional Comments: =================================
//= 5.0 Last update by GmOcean.
//= 5.1 Cleaned and standardized, mostly. [Euphy]
//============================================================
quiz_01,237,276,4 script Disguise Event 795,{
// Currently set to run every two hours.
// To change times, edit the OnClock labels below.
set .@GMLevel,60; // GM level required to access NPC.
set .@n$,"[^0000FFDisguise NPC^000000]";
if (getgmlevel()>=.@GMLevel) {
mes .@n$;
mes "Select an option.";
next;
switch(select("Turn ON/OFF Event:Event Settings")) {
case 1:
mes .@n$;
if ($@EventON) {
mes "The Event is currently: [^0000FFON^000000]";
mes "Would you like to turn it OFF?"; }
else {
mes "The Event is currently: [^FF0000OFF^000000]";
mes "Would you like to turn it ON?"; }
if(select("Yes:No")==2) close;
if ($@EventON) {
set $@EventON,0; set $@Timer,0;
setnpctimer 0; stopnpctimer;
announce "A GM has decided to turn the Disguise Event off. As a result no further prizes will be given.",bc_map | bc_blue;
deletepset 1;
setnpcdisplay "Disguise Event",795;
close; }
set $@EventON,1; set $@Timer,1; setnpctimer 0; initnpctimer;
set $@ResetCounter,$@ResetCounter+1;
announce "The Disguise Event will begin in 3 minutes.",bc_all | bc_blue;
announce "The Event is being held in Prontera.",bc_all | bc_blue;
close;
case 2:
mes .@n$;
mes "Pick a setting to modify.";
next;
switch(select("Monster Display:Number of Rounds:Prize Settings")) {
case 1:
setarray .@r$[0],"Disguise as all monsters.","Disguise as MVPs only.";
mes .@n$;
mes "Choose a disguise rule.";
next;
set $Rule, select(implode(.@r$,":"));
mes .@n$;
mes "The Disguise Rule has been set:";
mes " > ^0055FF"+.@r$[$Rule-1]+"^000000";
close;
case 2:
mes .@n$;
mes "Input the number of rounds you want the event to last.";
mes "Current number: [^0000FF"+$Rounds+"^000000]";
next;
input .@Rounds;
set $Rounds,.@Rounds;
mes .@n$;
mes "The number of rounds has been changed to "+$Rounds+".";
close;
case 3:
mes .@n$;
mes "Input the Item ID of the prize given each round.";
mes "Current item: [^0000FF"+getitemname($Prize)+"^000000] (ID #"+$Prize+")";
next;
input .@Prize;
mes .@n$;
if (getitemname(.@Prize)=="" || getitemname(.@Prize)=="null") {
mes "That item does not exist. Please try again.";
close; }
set $Prize,.@Prize;
mes "Input the amount to be given.";
next;
input .@amount;
mes .@n$;
if (.@amount<=0 || .@amount>=10000) {
mes "That amount is invalid. Using default ammount of 1.";
set .@amount,1;
next;
mes .@n$; }
set $PrizeAmt,.@amount;
mes "The Prize has been changed successfully.";
mes "Prize: "+$PrizeAmt+"x [^0000FF"+getitemname($Prize)+"^000000]";
close;
}
}
}
if ($@EventON) end;
mes .@n$;
mes "Welcome.";
mes "How may I be of assistance?";
if(select("Information:Nothing, just passing through.")==2) close;
next;
mes .@n$;
mes "This event is quite simple.";
mes "At the start of the event, I will";
mes "disguise myself as a random";
mes "monster. You have to shout";
mes "that monter's name out loud.";
next;
mes "If you are correct, you will receive";
mes "a prize. If not, keep trying!";
mes "That's all that there is to this event.";
close;
OnInit:
disablenpc "disevent";
set $@EventON,0;
set $@Wait,0;
set $@Winner,0;
set $@ResetCounter,0;
set $Points,$Points;
if (!$Rounds) set $Rounds,10;
else set $Rounds,$Rounds;
if ($Rule) set $Rule,1;
else set $Rule,$Rule;
setarray $@MVP[0],1038,1039,1046,1059,1086,1087,1112,1115,1147,1150,1157,1159,1190,1251,1252,1272,1312,1373,
1389,1399,1418,1492,1502,1511,1583,1623,1630,1646,1647,1648,1649,1650,1651,1658,1685,1688,
1708,1719,1734,1751,1768,1779,1785,1802,1832,1871,1874,1885,1917,1980,2022,2068,2087,2131,
2156,2165;
setarray $@BlackList[0], 1003,1006,1017,1021,1022,1027,1043,1075,1136,1137,1168,1171,1172,1173,1181,1183,1184,1187,1210,1217,1218,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1236,1237,1238,1239,1240,1241,1284,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1393,1394,1399,1407,1411,1414,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1495,1501,1518,1519,1521,1522,1523,1524,1525,1526,1527,1528,1530,1531,1532,1533,1534,1535,1536,1537,1538,1539,1540,1541,1542,1543,1544,1545,1546,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1589,1590,1591,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1624,1625,1659,1660,1662,1663,1665,1666,1667,1669,1675,1683,1684,1689,1690,1691,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1756,1757,1758,1759,1760,1763,1764,1766,1767,1786,1787,1788,1790,1791,1793,1794,1795,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1809,1810,1811,1812,1813,1814,1817,1818,1819,1820,1821,1822,1824,1825,1826,1827,1828,1834,1835,1841,1842,1843,1846,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860,1861,1862,1863,1868,1874,1876,1877,1878,1879,1886,1887,1888,1889,1891,1892,1893,1895,1896,1897,1898,1899,1900,1901,1904,1905,1906,1922,1923,1924,1925,1926,1927,1928,1930,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1948,1949,1950,1951,1952,1953,1954,1962,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1996,1997,1998,2000,2001,2002,2003,2004,2005,2006,2007,2010,2011,2012,2025,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2075,2076,2077,2078,2079,2080,2081,2082,2083,2084,2085,2086,2087,2088,2089,2090,2091,2092,2093,2094,2095,2096,2097,2098,2099,2100,2101,2012,2103,2104,2105,2106,2107,2108,2109,2027,2110,2111,2112,2113,2114,2115,2116,2117,2118,2226,2144,2145,2152,2153,2154,2155,2157,2186,2187,2188,2189,2190,2194,2222,2223,2224,2229,2231,2233,2236,2238,2240,2309,2310,2225,2234,2241;
setarray $@BlackList2[0],2119,2120,2121,2123,2124,2125,1496,1879;
end;
OnClock0200:
OnClock0500:
OnClock0800:
OnClock1100:
OnClock1400:
OnClock1700:
OnClock2000:
OnClock2300:
set $@ResetCounter,$@ResetCounter+1;
set $@EventON,1;
set $@Timer,1;
set $@Wait,1;
announce "The Disguise Event will begin in 3 minutes, head to the portal in Prontera to begin!",bc_all | bc_blue;
enablenpc "disevent";
setnpctimer 0;
initnpctimer;
end;
OnTimer10000:
if ($@Timer || $@Change) end;
set $@Wait,0;
goto iDisguise;
end;
OnTimer30000:
if ($@Timer) end;
set $@Change,0;
setnpcdisplay "Disguise Event",795;
npctalk "You took too long to guess what I was. Please wait 10 seconds while I disguise again.";
specialeffect 725;
set $MonsterName$,"";
deletepset 1;
stopnpctimer;
setnpctimer 0;
initnpctimer;
end;
OnTimer60000:
if ($@Timer!=1) end;
announce "The Disguise Event will begin in 2 minutes. Make your way to the portal in Prontera!",bc_all | bc_blue;
end;
OnTimer120000:
if ($@Timer!=1) end;
announce "The Disguise Event will begin 1 minute. Hurry to Prontera and enter the warp!",bc_all | bc_blue;
end;
OnTimer150000:
if ($@Timer!=1) end;
announce "The Disguise Event will begin in 20 seconds. Hurry to Prontera and enter the warp!",bc_all | bc_blue;
end;
OnTimer170000:
if ($@Timer!=1) end;
announce "The Disguise Event warps are closed! Event will begin in 10 seconds!",bc_all | bc_blue;
disablenpc "disevent";
end;
OnTimer180000:
if ($@Timer!=1) end;
announce "The Disguise Event has begun! The next one is in [3] hours!",bc_all | bc_blue;
set $@Timer,0; stopnpctimer;
setnpctimer 0; initnpctimer;
goto iDisguise;
end;
iDisguise:
if ($Rule==1) {
set $@Winner,0;
set $@Monster,1000+rand(1,995);
for(set .@BL,0; .@BL<getarraysize($@BlackList); set .@BL,.@BL+1)
if ($@Monster==$@BlackList[.@BL] || $@Monster==$@BlackList2[.@BL]) goto iDisguise;
if ($@Monster==$@LastMonster) goto iDisguise;
set $@LastMonster,$@Monster;
set $MonsterName$,getmonsterinfo($@Monster,0); }
if ($Rule==2) {
set $@Winner,0;
set $@Monster,rand(49);
set $MonsterName$,getmonsterinfo($@MVP[$@Monster],0); }
deletepset 1;
defpattern 1,"([^:]+):.\\s*"+$MonsterName$+".*", "iCorrect";
activatepset 1;
if ($Rule==1) setnpcdisplay "Disguise Event",$@Monster;
if ($Rule==2) setnpcdisplay "Disguise Event",$@MVP[$@Monster];
set $@Change,1;
setnpctimer 0;
end;
iCorrect:
if ($@Winner) {
dispbottom "Someone has already won this round."; end; }
set $@Winner,1;
set $@RoundCount,$@RoundCount+1;
deletepset 1;
activatepset 1;
set #KAFRAPOINTS, #KAFRAPOINTS + 1; // Change This item id to what ever you want . item id,amount
dispbottom "+1 Kafra Point";
announce strcharinfo(0)+" is correct! I was disguised as: "+$MonsterName$+"",bc_map | bc_blue;
if ($@RoundCount>=$Rounds) {
setnpcdisplay "Disguise Event",795;
set $@RoundCount,0; set $@Change,0; set $@EventON,0;
setnpctimer 0; stopnpctimer;
npctalk "Thank you all for playing. That was the last round of the Disguise Event. Come play again later.";
atcommand "@doommap";
end; }
setnpcdisplay "Disguise Event",795;
set $@Change,0;
setnpctimer 0;
end;
}
quiz_01 mapflag nowarp
quiz_01 mapflag nowarpto
quiz_01 mapflag noteleport
quiz_01 mapflag nosave
quiz_01 mapflag nomemo
quiz_01 mapflag nobranch
quiz_01 mapflag noloot
quiz_01 mapflag noskill
quiz_01 mapflag nopenalty