Advertisement
Guest User

Untitled

a guest
May 12th, 2012
791
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.55 KB | None | 0 0
  1. //=========================================================================//
  2. /*
  3. Script Name : Information Center
  4.  
  5. Script Creator : maniacsociety
  6.  
  7. Script Function :
  8. - Server Information Center
  9. - To know more about your Server
  10. - SQL Function
  11. - Send Support Ticket
  12. - Donation Panel
  13. - Code panel
  14.  
  15. */
  16. //=========================================================================//
  17. // Npc Location
  18. //=========================================================================//
  19. prontera.gat,153,181,5 script Information Center 910,{
  20. //=========================================================================//
  21. // Configuration
  22. //=========================================================================//
  23. set .@gmcode$,callsub(S_GenerateRandStr,10,12);
  24. set .@gmcodes$,callsub(S_GenerateRandStr,10,12);
  25. set .@gm1$,callsub(S_GenerateRandStr,10,12);
  26. set .@gm2$,callsub(S_GenerateRandStr,10,12);
  27. set .@npcname$,"^FF0000[Information Center Assistant]^000000";
  28. set .@code$,"^FFF000[Encoder Department Assistant]^000000";
  29. set .@donate$,"^0000FF[Donation Department Assistant]^000000";
  30. set .@server$,"^FFFF00[National Ragnarok Online]^000000";
  31. set .@admincp$,"^FF0000[09993591472]^000000";
  32.  
  33.  
  34. //=========================================================================//
  35. // NPC On Talk
  36. if(getgmlevel() <99) goto NormalPlayerViews;
  37. if(getgmlevel() >= 99) goto AdminViews;
  38. //=========================================================================//
  39. NormalPlayerViews:
  40. cutin "zonda_01",2;
  41. mes .@npcname$;
  42. mes "Welcome "+strcharinfo(0)+" to the "+.@server$+" Information Center";
  43. mes "I am here to guide you.";
  44. mes "What do you want to know?";
  45. next;
  46. switch(select("About this Server:Donation:Encode:Cancel")){
  47. case 1:
  48. mes .@npcname$;
  49. mes "Please wait while redirecting to our Main Department.";
  50. next;
  51. goto ServerInfo;
  52. case 2:
  53. mes .@npcname$;
  54. mes "Please wait while redirecting to our Donation Department.";
  55. next;
  56. goto DonationInfo;
  57. case 3:
  58. mes .@npcname$;
  59. mes "Please wait while redirecting to our Encoder Department";
  60. next;
  61. goto EncodeInfo;
  62. case 4:
  63. mes .@npcname$;
  64. mes "Thank you for visiting "+.@server$+" Information Center";
  65. close;
  66. }
  67. cutin "", 255;
  68. end;
  69.  
  70. //=========================================================================//
  71. ServerInfo:
  72. cutin "zonda_01",2;
  73. mes .@npcname$;
  74. mes "Hello Im back.";
  75. mes "Which of the following you want to know?";
  76. menu "Send Support Ticket",L_SST,"Server Information",L_SI,"Game Master List",L_GML,"Cancel",-;
  77.  
  78. mes .@npcname$;
  79. mes "Thank you for visiting Information Center.";
  80. mes "You can come back anytime you want";
  81. close;
  82.  
  83. L_SST:
  84. mes .@npcname$;
  85. mes "Okay before we continue on sending a support ticket.";
  86. mes "I will guide you on how or what to do.";
  87. next;
  88. mes .@npcname$;
  89. mes "----------------- Guide -----------------";
  90. mes "First : ";
  91. mes "Enter your name";
  92. mes "Second : ";
  93. mes "Subject of the letter";
  94. mes "Third : ";
  95. mes "Message";
  96. next;
  97. mes .@npcname$;
  98. mes "Please enter your name";
  99. input .@acc_n$;
  100. query_sql "SELECT `userid` FROM `login` WHERE `userid` = '"+@acc_n$+"'";
  101. if(.@acc_n$ == "") {
  102. next;
  103. mes .@npcname$;
  104. mes "The name you enter is not located at our system please try again.";
  105. goto L_SST;
  106. } else {
  107. next;
  108. mes .@npcname$;
  109. mes "You enter your name successfully.";
  110. mes "Next Enter the Subject Letter";
  111. input .@subject$;
  112. next;
  113. mes .@npcname$;
  114. mes "You Enter this "+.@subject$+" as your subject.";
  115. mes "And now the message.";
  116. input .@message$;
  117. next;
  118. mes .@npcname$;
  119. mes "You Enter this as your message.";
  120. next;
  121. mes .@npcname$;
  122. mes "Input your email address in case we cannot contact you online.";
  123. input .@mail$;
  124. next;
  125. mes .@npcname$;
  126. mes "-------------- Full Info ---------------";
  127. mes "Name : "+.@acc_n$+" ";
  128. mes "Subject : "+.@subject$+" ";
  129. mes "Message : ";
  130. mes ""+.@message$+" ";
  131. next;
  132. query_sql "INSERT INTO `supportsystem` (`account_name`,`subject`,`message`,`email`) VALUES ( '"+.@acc_n$+"' , '"+.@subject$+"' , '"+.@message$+"' , '"+.@mail$+"' )";
  133. mes .@npcname$;
  134. mes "We are now sending a message to our department.";
  135. mes "We will send you a message once our head department read it.";
  136. close;
  137. cutin "", 255;
  138. end;
  139.  
  140. L_SI:
  141. mes .@npcname$;
  142. mes "Server Information";
  143. mes "Server Name : "+.@server+" ";
  144. mes "Server Rates : 1000/1000/1000";
  145. mes "Server Status : Online";
  146. next;
  147. mes .@npcname$;
  148. mes "Card & Equipment Rates";
  149. mes "Normal Card : 7.00";
  150. mes "Boss Card : 1.00";
  151. mes "Normal Equip : 40.00";
  152. mes "Boss Equip : 50.00";
  153. next;
  154. mes .@npcname$;
  155. mes "Server NPC";
  156. mes "Job Changer";
  157. mes "Kafra";
  158. mes "Platinum Skill";
  159. mes "Universal Rental";
  160. mes "Stylist";
  161. mes "PvP";
  162. mes "GvG";
  163. mes "Healer";
  164. mes "Reset Girl";
  165. mes "And many more.";
  166. next;
  167. mes .@npcname$;
  168. mes "Custom Items :";
  169. mes "Weapon";
  170. mes "Wings";
  171. mes "Armor";
  172. mes "Shield";
  173. mes "Headgear";
  174. mes "Accessory";
  175. mes "Card";
  176. mes "Set";
  177. close;
  178. cutin "", 255;
  179. end;
  180.  
  181. L_GML:
  182. next;
  183. mes .@npcname$;
  184. mes "Here are the list of Game Master";
  185. mes "^FF0000Admin Chivas^000000";
  186. mes "- Server Owner";
  187. mes "- Main Admin";
  188. mes "- Server Host";
  189. next;
  190. mes .@npcname$;
  191. mes "^FFF000Admin Glade^000000";
  192. mes "- Scripter";
  193. mes "- Developer";
  194. mes "- Co-Admin";
  195. mes "- Co-Owner";
  196. next;
  197. mes .@npcname$;
  198. mes "^0000FFGM Force^000000";
  199. mes "- Event GM";
  200. mes "- Customier";
  201. close;
  202. cutin "", 255;
  203. end;
  204.  
  205. //=========================================================================//
  206. DonationInfo:
  207. cutin "kafra_02",2;
  208. mes .@donate$;
  209. mes "This is the Donation Department";
  210. mes "How may I help you sir?";
  211. menu "^FFF000Get My Code^000000",L_GMC,"^0000FFDonate^000000",L_D,"Donation Info",L_DI,"Cancel",-;
  212.  
  213. mes .@donate$;
  214. mes "Thank you for visiting Donation Department";
  215. close;
  216.  
  217. L_GMC:
  218. mes .@donate$;
  219. mes "Welcome "+strcharinfo(0)+"";
  220. mes "Are you here to claim your donate?";
  221. next;
  222. mes "Input your validation code.";
  223. input .@valid$;
  224. query_sql "SELECT `validation` FROM `donatesystem` WHERE `validation` ='"+.@valid$+"'";
  225. if(.@valid$ == "") {
  226. next;
  227. mes "The validation code you enter is incorrect.";
  228. mes "Please try again";
  229. goto DonationInfo;
  230. } else {
  231. next;
  232. mes .@donate$;
  233. mes "You enter a correct validation code.";
  234. mes "Here is you Code.";
  235. query_sql "SELECT `code` FROM `donatesystem` WHERE `validation`= '"+.@valid$+"'", .@codenumber$;
  236. next;
  237. mes .@donate$;
  238. mes " "+.@codenumber$+" ";
  239. dispbottom "Code : ["+.@codenumber$+"] ";
  240. close;
  241.  
  242. L_D:
  243. next;
  244. mes .@donate$;
  245. mes "Donate? You cannot donate online";
  246. mes "Except for Load Donation";
  247. next;
  248. mes .@donate$;
  249. mes "You want to donate by Load Donation?";
  250. next;
  251. mes "Enter you account name";
  252. input .@acc_name$;
  253. next;
  254. mes "Enter the Phone Number";
  255. input .@cp_n$;
  256. next;
  257. mes "Enter the amount";
  258. input .@cp_amount$;
  259. query_sql "INSERT INTO `donatesystem` ( `account_name` , `phonenumber` , `amount` ) VALUES ('"+.@acc_name$+"' ,'"+.@cp_n$+"' ,'"+.@cp_amount$+"')";
  260. next;
  261. mes .@donate$;
  262. mes "Once we confirm the load donation";
  263. mes "We will email you in game with the validation code.";
  264. next;
  265. mes .@donate$;
  266. mes "If you load the amount already and verify already.";
  267. mes "By receiving the email.";
  268. mes "You can simply get you code.";
  269. next;
  270. goto DonationInfo;
  271.  
  272. L_DI:
  273. mes .@donate$;
  274. mes "Which contact of Admin you want to view?";
  275. next;
  276. menu "Admin Chivas",L_AC$,"Admin Glade",-;
  277.  
  278. mes .@donate$;
  279. mes "Donation Information Center";
  280. next;
  281. mes "How to Donate? for Admin Glade?";
  282. mes "PayPal, Western Union, LBC & Other Transfer Method";
  283. mes "Name : Mark Willow Aldave";
  284. mes "Age : 18";
  285. mes "Address : ISG Central Zone II Western Bicutan Taguig City";
  286. mes "Phone Number : "+.@admincp$+" ";
  287. next;
  288. mes "Load Donation Method?";
  289. mes "1. Name";
  290. mes "2. Phone Number";
  291. mes "3. Amount";
  292. mes "And then send to "+.@admincp$+" ";
  293. next;
  294. mes "How to claim the donate?";
  295. mes "Our system will email you as soon as possible you`ve done donating";
  296. mes "If we already verify the donate we will email you.";
  297. next;
  298. mes "Once you receive an email thats the validation code you have to enter it into encoder department.";
  299. close;
  300.  
  301. L_AC$:
  302. mes .@donate$;
  303. mes "Donation Information Center";
  304. next;
  305. mes "How to Donate? for Admin Glade?";
  306. mes "PayPal, Western Union, LBC & Other Transfer Method";
  307. mes "Name : N/A";
  308. mes "Age : N/A";
  309. mes "Address : N/A";
  310. mes "Phone Number : N/A ";
  311. next;
  312. mes "Load Donation Method?";
  313. mes "1. Name";
  314. mes "2. Phone Number";
  315. mes "3. Amount";
  316. mes "And then send to N/A ";
  317. next;
  318. mes .@npcname$;
  319. mes "Visit our site for Admin Chivas";
  320. mes "www.nationalro.axwebs.com";
  321. next;
  322. mes "How to claim the donate?";
  323. mes "Our system will email you as soon as possible you`ve done donating";
  324. mes "If we already verify the donate we will email you.";
  325. next;
  326. mes "Once you receive an email thats the validation code you have to enter it into encoder department.";
  327. close;
  328. cutin "", 255;
  329. end;
  330. //=========================================================================//
  331. EncodeInfo:
  332. cutin "kafra_05",2;
  333. mes .@code$;
  334. mes "Welcome to Encoder Department";
  335. mes "How may I help you?";
  336. menu "Enter My Code",L_EMC,"Cancel",-;
  337.  
  338. next;
  339. mes .@code$;
  340. mes "Thank you for visiting Encoder department you can come back if you want.";
  341. close;
  342.  
  343. L_EMC:
  344. next;
  345. mes .@code$;
  346. mes "Please enter your code";
  347. input .@codelist$;
  348. if(query_sql("SELECT `codelist`,`status`=1 FROM `encodesystem` WHERE `codelist`='"+escape_sql(.@codelist$)+"'", .@codelist$,.@used))
  349. if(.@used){
  350. next;
  351. mes .@code$;
  352. mes "This code is correct but its already used by another character.";
  353. mes "Please input a different code.";
  354. close;
  355. } else {
  356. query_sql "UPDATE `encodesystem` SET `status`=0 WHERE `codelist`='"+.@codelist$+"'";
  357. mes .@code$;
  358. mes "This code is valid and correct.";
  359. mes "Redirecting to Shop Department";
  360. query_sql "UPDATE `encodesystem` SET `status`=1 WHERE `codelist`='"+.@codelist$+"'";
  361. next;
  362. goto ShopInfo;
  363. } else {
  364. mes .@code$;
  365. mes "The system cannot find your code";
  366. mes "Please enter a valid one.";
  367. close;
  368.  
  369. ShopInfo:
  370. mes "^FFFF00[Shop Department]^000000";
  371. mes "Please choose your desired item";
  372. next;
  373. switch(select("100 Gacha Box",
  374. "5000 Coupon",
  375. "4000 nRO Cash Ticket",
  376. "Unknown Box 1",
  377. "Unknown Box 2",
  378. "Unknown Box 3",
  379. "Unknown Box 4",
  380. "Unknown Box 5")){
  381. case 1: callsub L_Reward,30800,100;
  382. case 2: callsub L_Reward,30800,100;
  383. case 3: callsub L_Reward,30800,100;
  384. case 4: callsub L_Reward,30800,100;
  385. case 5: callsub L_Reward,30800,100;
  386. case 6: callsub L_Reward,30800,100;
  387. case 7: callsub L_Reward,30800,100;
  388. }
  389.  
  390. L_Reward:
  391. mes "^FFFF00[Shop Department]^000000";
  392. mes "Request Confirm";
  393. getitem getarg(0),getarg(1);
  394. close;
  395. cutin "", 255;
  396. end;
  397. }
  398. }
  399. }
  400.  
  401. //=========================================================================//
  402.  
  403. AdminViews:
  404. mes .@npcname$;
  405. mes "Welcome "+strcharinfo(0)+" to the "+.@server$+" Information Center.";
  406. mes "How may I help yah sir?";
  407. next;
  408. menu "View Support Ticket Log",L_VSTL,"View Donation Log",L_VDL,"View Code Log",L_VCL,"Add Code",L_AC,"Add Donation",L_AD,"Add Validation",L_AV,"Delete Code^000000",L_DC,"Delete Donate",L_DD,"Player Views",L_PV;
  409.  
  410. L_VSTL:
  411. mes .@npcname$;
  412. mes "This is the list of character who send support ticket";
  413. query_sql "SELECT `account_name` , `subject` , `message` , `email` FROM `supportsystem` ORDER BY `account_name` DESC", .@acc_n$, .@subject$, .@message$, .@mail$;
  414. if(.@acc_n$) {
  415. mes .@npcname$;
  416. mes "There are no entrys in the Support Ticket List.";
  417. close;
  418. } else {
  419. next;
  420. mes .@npcname$;
  421. mes "The list will spawn at your main chat box.";
  422. dispbottom "Account Name | Subject | Message | Email";
  423. for(set @ei,0; @ei < getarraysize(.@acc_n$); set @ei,@ei + 1) {
  424. dispbottom ""+.@acc_n$[@ei]+" | "+.@subject$[@ei]+" | "+.@message$[@ei]+" | "+.@mail$[@ei]+" ";
  425. goto AdminViews;
  426.  
  427. L_VDL:
  428. mes .@npcname$;
  429. mes "This is the list of donation logs";
  430. query_sql "SELECT `account_name` , `phonenumber` , `amount` FROM `donatesystem` ORDER BY `account_name` DESC", .@acc_name$, .@cp_n$, .@cp_amount$;
  431. if(.@acc_name$) {
  432. mes .@npcname$;
  433. mes "There are no entrys in the Donation List.";
  434. close;
  435. } else {
  436. next;
  437. mes .@npcname$;
  438. mes "The list will spawn at your main chat box.";
  439. dispbottom "Account Name | Phone Number | Amount";
  440. for(set @ei,0; @ei < getarraysize(.@acc_name$); set @ei,@ei + 1) {
  441. dispbottom ""+.@acc_name$[@ei]+" | "+.@cp_n$[@ei]+" | "+.@cp_amount$[@ei]+" ";
  442. next;
  443. goto AdminViews;
  444.  
  445. L_VCL:
  446. mes .@npcname$;
  447. mes "This is the list of code logs";
  448. query_sql "SELECT `codelist` , `status` , `validation` FROM `encodesystem` ORDER BY `codelist` DESC", .@codelist$, .@status$, .@validation$;
  449. if(.@codelist) {
  450. mes .@npcname$;
  451. mes "There are no entrys in the Code List.";
  452. close;
  453. } else {
  454. next;
  455. mes .@npcname$;
  456. mes "The list will spawn at your main chat box.";
  457. dispbottom "Codelist | Status | Validation";
  458. for(set @ei,0; @ei < getarraysize(.@codelist$); set @ei,@ei + 1) {
  459. dispbottom ""+.@codelist$[@ei]+" | "+.@status$[@ei]+" | "+.@validation$[@ei]+" ";
  460. next;
  461. goto AdminViews;
  462.  
  463. L_AC:
  464. mes .@npcname$;
  465. mes "Do you want to add code?";
  466. mes "Please enter the code.";
  467. next;
  468. input .@codelist$;
  469. next;
  470. mes "Please input now the code status";
  471. input .@status$;
  472. next;
  473. mes "And now input the validation for the code.";
  474. input .@validation$;
  475. next;
  476. mes .@npcname$;
  477. mes "This is what you enter.";
  478. mes "Code : "+.@codelist$+" ";
  479. mes "Status : "+.@status$+" ";
  480. mes "Validation : "+.@validation$+" ";
  481. next;
  482. query_sql "INSERT INTO `encodesystem` ( `codelist` ,`status`,`validation`) VALUES ( '"+.@codelist$+"' , '"+.@status$+"' , '"+.@validation$+"' )";
  483. mes .@npcname$;
  484. mes "Code has been successfully added.";
  485. next;
  486. goto AdminViews;
  487.  
  488. set .@stats$,1;
  489. L_AD:
  490. mes .@npcname$;
  491. mes "Do you want to add donation?";
  492. mes "Please input the donator name";
  493. input .@name$;
  494. next;
  495. mes "Input the Phone Number";
  496. input .@cp$;
  497. next;
  498. mes "Input the donated amount";
  499. input .@amount$;
  500. next;
  501. mes "This is the validation code.";
  502. mes " "+.@gm1$+" ";
  503. next;
  504. mes "This is the code.";
  505. mes " "+.@gm2$+" ";
  506. next;
  507. mes .@npcname$;
  508. mes "This is the new donation that you have been added.";
  509. mes "Donator Name : "+.@name$+" ";
  510. mes "Phone Number : "+.@cp$+" ";
  511. mes "Amount : "+.@amount$+" ";
  512. mes "Validation : "+.@gm1$+"";
  513. mes "Code : "+.@gm2$+" ";
  514. next;
  515. query_sql "INSERT INTO `donatesystem` (`account_name`,`phonenumber`,`amount`,`validation`,`code`) VALUES ('"+.@name$+"','"+.@cp$+"','"+.@amount$+"','"+.@gm1$+"','"+.@gm2$+"')";
  516. query_sql "INSERT INTO `encodesystem` (`codelist`,`status`,`validation`) VALUES ('"+.@gm2$+"','"+.@stats$+"','"+.@gm1$+"')";
  517. mes .@npcname$;
  518. mes "Donation has been added";
  519. next;
  520. goto AdminViews;
  521.  
  522. set .@codestats$,0;
  523. L_AV:
  524. mes .@npcname$;
  525. mes "Add a validation to unvalidate donate?";
  526. mes "but first I have to ask some questions";
  527. mes "Please input the Character Name";
  528. input .@name$;
  529. next;
  530. query_sql "SELECT `account_name` FROM `donatesystem` WHERE `account_name` = '"+.@name$+"'", @check_id$;
  531. if(@check_id$) {
  532. mes "Invalid Name, please try again.";
  533. goto L_AV;
  534. } else {
  535. next;
  536. dispbottom "Character Name: "+.@name$;
  537. mes .@npcname$;
  538. mes "This is the validation code for that account";
  539. mes " "+.@gmcode$+" ";
  540. next;
  541. mes .@npcname$;
  542. mes "This is the code for that account";
  543. mes " "+.@gmcodes$+" ";
  544. next;
  545. mes .@npcname$;
  546. mes "This is what you want to add.";
  547. mes "Character Name : "+.@name$+" ";
  548. mes "Validation Code : "+.@gmcode$+" ";
  549. mes "Code : "+.@gmcodes$;
  550. next;
  551. query_sql "UPDATE `donatesystem` SET `validation`='"+.@gmcode$+"' WHERE `account_name`='"+.@name$+"'";
  552. query_sql "UPDATE `donatesystem` SET `code`='"+.@gmcodes$+"' WHERE `account_name`='"+.@name$+"'";
  553. query_sql "INSERT INTO `encodesystem` (`codelist`,`status`,`validation`) VALUES ('"+.@gmcodes$+"','"+.@codestats$+"','"+.@gmcode$+"')";
  554. query_sql "UPDATE `encodesystem` SET `validation`='"+.@gmcode$+"' WHERE `codelist`='"+.@gmcodes$+"'";
  555. query_sql "UPDATE `encodesystem` SET `status`='"+.@codestats$+"' WHERE `codelist`='"+.@gmcodes$+"'";
  556. mes .@npcname$;
  557. mes "You have successfully add the validation";
  558. next;
  559. goto AdminViews;
  560.  
  561. L_DC:
  562. mes .@npcname$;
  563. mes "Code Delete System";
  564. mes "Please choose,";
  565. mes "Which you want to be deleted";
  566. next;
  567. query_sql "SELECT `codelist` , `status` , `validation` FROM `encodesystem`", .@codelist$, .@status$, .@validation$;
  568. if(.@codelist$ == "") {
  569. mes .@npcname$;
  570. mes "There is no entry at Code System.";
  571. close;
  572. }
  573. set @code_menu$,"";
  574. for(set @ei,0; @ei < getarraysize(.@codelist$); set @ei,@ei + 1) {
  575. mes "Code System List";
  576. mes .@codelist$[@ei];
  577. mes "---- Status ----";
  578. mes .@status$[@ei];
  579. mes "-- Validation --";
  580. mes .@validation$;
  581. set @code_menu$,@code_menu$ + "- "+.@codelist$[@ei]+":";
  582. }
  583. set @code_menu$,@code_menu$ + "- Nothing";
  584. if((prompt(@code_menu$) - getarraysize(.@codelist$)) > 0) {
  585. break;
  586. } else {
  587. next;
  588. set @ip,@menu - 1;
  589. mes .@npcname$;
  590. mes "You have choosen";
  591. mes "Code Name ";
  592. mes .@codelist$[@ip];
  593. mes "---- Status ----";
  594. mes .@status$[@ip];
  595. mes "-- Validation --";
  596. mes .@validation$[@ip];
  597. mes "================";
  598. mes "Wanna delete this entry";
  599. next;
  600. query_sql "DELETE FROM `encodesystem` WHERE `codelist` = '"+.@codelist$[@ip]+"'";
  601. mes .@npcname$;
  602. mes "The entry has been deleted.";
  603. close;
  604. }
  605.  
  606. L_DD:
  607. mes .@npcname$;
  608. mes "Donate Delete System";
  609. mes "Please choose,";
  610. mes "Which you want to be deleted";
  611. next;
  612. query_sql "SELECT `account_name` , `phonenumber` , `amount` FROM `donatesystem`", .@name$, .@cp$, .@amount$;
  613. if(.@name$ == "") {
  614. mes .@npcname$;
  615. mes "There is no entry at Donate System.";
  616. close;
  617. }
  618. set @codes_menu$,"";
  619. for(set @ei,0; @ei < getarraysize(.@name$); set @ei,@ei + 1) {
  620. mes "Code System List";
  621. mes .@name$[@ei];
  622. mes "- Phone Number -";
  623. mes .@cp$[@ei];
  624. mes "---- Amount ----";
  625. mes .@amount$;
  626. set @codes_menu$,@codes_menu$ + "- "+.@name$[@ei]+":";
  627. }
  628. set @codes_menu$,@codes_menu$ + "- Nothing";
  629. if((prompt(@codes_menu$) - getarraysize(.@name$)) > 0) {
  630. break;
  631. } else {
  632. next;
  633. set @ip,@menu - 1;
  634. mes .@npcname$;
  635. mes "You have choosen";
  636. mes "Code Name ";
  637. mes .@name$[@ip];
  638. mes "- Phone Number -";
  639. mes .@cp$[@ip];
  640. mes "---- Amount ----";
  641. mes .@amount$[@ip];
  642. mes "================";
  643. mes "Wanna delete this entry";
  644. next;
  645. query_sql "DELETE FROM `donatesystem` WHERE `account_name` = '"+.@name$[@ip]+"'";
  646. mes .@npcname$;
  647. mes "The entry has been deleted.";
  648. next;
  649. close;
  650. }
  651.  
  652. L_PV:
  653. mes .@npcname$;
  654. mes "Please wait while redirecting to the Player Menu";
  655. next;
  656. goto NormalPlayerViews;
  657.  
  658. S_GenerateRandStr:
  659. // getarg(0) = type Value is a bit field (1: lowercase, 2: numbers, 4: symbols, 8: UPPERCASE)
  660. // getarg(1) = length
  661. if (getarg(0) & 1) setarray .@chars$[getarraysize(.@chars$)], "a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z";
  662. if (getarg(0) & 2) setarray .@chars$[getarraysize(.@chars$)], "1","2","3","4","5","6","7","8","9","0";
  663. if (getarg(0) & 4) setarray .@chars$[getarraysize(.@chars$)], "!","@","#","$","%","^","&","*","(",")","<",">","?";
  664. if (getarg(0) & 8) setarray .@chars$[getarraysize(.@chars$)], "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z";
  665.  
  666. set .@length, getarg(1);
  667. while (.@length) {
  668. set .@str$, .@str$ + .@chars$[rand(getarraysize(.@chars$))];
  669. set .@length, .@length -1;
  670. }
  671. return .@str$;
  672. }
  673. }
  674. }
  675. }
  676. }
  677. }
  678. }
  679. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement