brendorox

Untitled

Aug 18th, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.08 KB | None | 0 0
  1. /* ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
  2. /\ \ /\ \ /\ \ /\__\ /\ \ /\ \ /\ \ /\ \ /\__\ /\__\ /\ \
  3. \:\ \ /::\ \ /::\ \ /:| _|_ /::\ \ /::\ \ /::\ \ /::\ \ /:| _|_ /:/ _/_ /::\ \
  4. /::\__\ /::\:\__\ /:/\:\__\ /::|/\__\ /:/\:\__\ /:/\:\__\ /::\:\__\ /:/\:\__\ /::|/\__\ /:/_/\__\ /\:\:\__\
  5. /:/\/__/ \:\:\/ / \:\ \/__/ \/|::/ / \:\/:/ / \:\ \/__/ \;:::/ / \:\/:/ / \/|::/ / \:\/:/ / \:\:\/__/
  6. \/__/ \:\/ / \:\__\ |:/ / \::/ / \:\__\ |:\/__/ \::/ / |:/ / \::/ / \::/ /
  7. \/__/ \/__/ \/__/ \/__/ \/__/ \|__| \/__/ \/__/ \/__/ \/__/
  8. T e c n o C r o n u s N e t W o r k P r e s e n t s
  9. *------------------------------------------ eAthena Script --------------------------------------------*
  10. *- Sistema de Rops *
  11. *----------------------------------------------- By: --------------------------------------------------*
  12. *- TecnoCronus *
  13. *------------------------------------------ Current Version: ------------------------------------------*
  14. *- 2.0 *
  15. *------------------------------------------ Compatible With: ------------------------------------------*
  16. *- eAthena *
  17. *------------------------------------------- Description: ---------------------------------------------*
  18. *- 1.0 *
  19. *---------------------------------------- Additional Comments: ----------------------------------------*
  20. *- 1.0 Trabalha em eAthena TXT e SQL *
  21. *- 1.1 Em eAthena TXT, o Player tem que estar Online na Hora de adicionar Créditos *
  22. *- 1.2 Auto detecção, se é TXT ou SQL *
  23. *- 2.0 VERSÃO 2.0 Adiconado o Sistema Rápido *
  24. *- 2.1 "Sistema Rápido" funciona assim, você manda uma mensagem em privado para ROP com o Nome do Joga *
  25. *- dor que vai receber os Rops, depois manda outra menssagem com o Número de Rops que ele vai *
  26. *- receber. *
  27. *- 2.2 O LvL Mínimo para Adicionar Rops é Conforme a Variável "$@Rop_MinGMLvl" na Linha "243" *
  28. *------------------------------------------ Bug Report Link: -----------------------------------------*
  29. *- http://www.eathena.ws/board/index.php?showtopic=203654&st=0 *
  30. *------------------------------------------------------------------------------------------------------*/
  31. prontera,174,215,4 script Loja de Rops 718,{
  32. if($@UseMySQL == 0) {
  33. if(getgmlevel()>=$@Rop_MinGMLvl) {
  34. set @adm$, strcharinfo(0);
  35. mes "[^9f13f8 Vendedor ^000000]";
  36. mes "Olá Administrador, diga o nome do jogador que você deseja adicionar Rops";
  37. input @name$;
  38. set @getcharID, getcharid(0,@name$);
  39. set @getcharid2, getcharid(3,@name$);
  40. set @Online, isloggedin(@getcharID,@getcharid2);
  41. if (!getarraysize(@getcharID)){
  42. mes "[^9f13f8 Vendedor ^000000]";
  43. mes "Essa conta não existe";
  44. close;
  45. } else if (@Online!=1) {
  46. mes "[^9f13f8 Vendedor ^000000]";
  47. mes " ^3cbd32 "+@name+" ^000000 não está Online";
  48. close;
  49. }
  50. mes "[^9f13f8 Vendedor ^000000]";
  51. mes "Quantos Rops você deseja que ^3cbd32 "+@name$+" ^000000 ganhe?";
  52. mes "Lembrando: Ele deve estar Online";
  53. input @Credit;
  54. mes "Ok, Adicionando ^FF0000 "+@Credit+" ^000000 Rops em ^3cbd32 "+@name+" ^000000 ";
  55. next;
  56. callfunc "AddCred";
  57. end;
  58. }
  59. callfunc "Sell";
  60. end;
  61. }
  62. if(getgmlevel()>=$@Rop_MinGMLvl) {
  63. mes "[^9f13f8 Vendedor ^000000]";
  64. mes "Olá Administrador, diga o nome do jogador que você deseja adicionar Rops";
  65. input @name2$;
  66. set @name3$, @name2$;
  67. set @name2$, getcharid(3,@name2$);
  68. query_sql "SELECT `userid` FROM `login` WHERE `userid` = `"+ @name2$ +"`", @SQLname$;
  69. if (!getarraysize(@SQLname$)){
  70. mes "Essa Conta não existe senhor.";
  71. close;
  72. }
  73. query_sql "SELECT `rops` FROM `login` WHERE `userid` = `"+ @name2$ +"`", @rops;
  74. mes "Essa pessoa tem "+@rops+" Rops";
  75. mes "Deseja Prosseguir?";
  76. if(select ("Sim","Não") == 2) close;
  77. mes "Quanto Créditos "+@SQLname$+" deve receber?";
  78. input @Cred$;
  79. mes "Confirmando: "+@name3$+" receberá "+@Cred$+" Rops, Deseja Continuar?";
  80. if(select ("Sim","Não") == 2) close;
  81. query_sql "UPDATE `login` SET `rops` = `rops` + `"+ @Cred$ +"` WHERE `userid` = `"+ @SQLname$ +"`";
  82. mes "Créditos adicionado com Sucesso";
  83. close;
  84. }
  85. callfunc "Sell";
  86. end;
  87.  
  88. OnInit:
  89. set $@Rop_MinGMLvl, 60;
  90. set @AutoD, query_sql("select version()");
  91. if(@AutoD < 0) { set $@UseMySQL,0; debugmes "Sistema Rops trabalhando em TXT"; } else { set $@UseMySQL,1; debugmes "Sistema Rops trabalhando em SQL"; }
  92. end;
  93. }
  94.  
  95.  
  96.  
  97. function script Addcred {
  98. attachrid(getcharid(3,@name$));
  99. set #RopPoint, #RopPoint+@Credit;
  100. mes "[^9f13f8 Vendedor ^000000]";
  101. mes "Você recebeu "+@credit+" Rops";
  102. close;
  103. attachrid(getcharid(3,@adm$));
  104. mes "[^9f13f8 Vendedor ^000000]";
  105. mes "Crédito Adicionado Com Sucesso";
  106. close;
  107. }
  108.  
  109. function script Sell {
  110. set @Login$, getcharid(3);
  111. `if($@UseMySQL == 1) query_sql "SELECT `rops` FROM `login` WHERE `account_id` = `"+ @Login$ +"`", @rops;
  112. mes "[^9f13f8 Vendedor ^000000]";
  113. if($@UseMySQL != 1) { mes "Você tem "+#RopPoint+" Rop(s)"; } else { mes "Você tem "+@rops+" Rop(s)"; }
  114. mes "Deseja trocar seus Rops por?";
  115. mes "Lembre-se: R significa Rops";
  116. switch(select("Alice Doll 12.000R","Flying Angel 9.000R","Hunter Cap[1] 8.000R","Little Angel Doll 8.000R","Sunglasses[1] 7.000R","Close Helmet 7.000R","Angeling Hat 7.000R","Deviling Hat 7.000R","Coppola 5.000R","Sair")) {
  117.  
  118. case 1:
  119. set @price$, 12000;
  120. `if($@UseMySQL == 1) query_sql "SELECT `rops` FROM `login` WHERE `account_id` = `"+ @Login$ +"`", @rops;
  121. mes "[^9f13f8 Vendedor ^000000]";
  122. mes "Uma Alice Doll?";
  123. mes "Ok, Vamos Trocar";
  124. mes "Vou checar se você tem 12k de R";
  125. mes "Se não tiver não falo mais com você";
  126. if(#RopPoint<@price$ || @rops<@price$) close;
  127. if($@UseMySQL == 1) query_sql "UPDATE `login` SET `rops` = `rops` - `"+ @price$ +"` WHERE `account_id` = `"+ @Login$ +"`";
  128. set #RopPoint,RopPoint-@price$;
  129. getitem 5137,1;
  130. mes "Troca feita";
  131. close;
  132. case 2:
  133. set @price$, 9000;
  134. `if($@UseMySQL == 1) query_sql "SELECT `rops` FROM `login` WHERE `account_id` = `"+ @Login$ +"`", @rops;
  135. mes "[^9f13f8 Vendedor ^000000]";
  136. mes "Flying Angel?";
  137. mes "Ok, Vamos Trocar";
  138. mes "Vou checar se você tem 9k de R";
  139. mes "Se não tiver não falo mais com você";
  140. if(#RopPoint<@price$ || @rops<@price$) close;
  141. if($@UseMySQL == 1) query_sql "UPDATE `login` SET `rops` = `rops` - `"+ @price$ +"` WHERE `account_id` = `"+ @Login$ +"`";
  142. set #RopPoint,RopPoint-@price$;
  143. getitem 5210,1;
  144. mes "Feito!";
  145. close;
  146. case 3:
  147. set @price$, 8000;
  148. `if($@UseMySQL == 1) query_sql "SELECT `rops` FROM `login` WHERE `account_id` = `"+ @Login$ +"`", @rops;
  149. mes "[^9f13f8 Vendedor ^000000]";
  150. mes "Hunter Cap[1]?";
  151. mes "Ok, Vamos Trocar";
  152. mes "Vou checar se você tem 8k de R";
  153. mes "Se não tiver não falo mais com você";
  154. if(#RopPoint<@price$ || @rops<@price$) close;
  155. if($@UseMySQL == 1) query_sql "UPDATE `login` SET `rops` = `rops` - `"+ @price$ +"` WHERE `account_id` = `"+ @Login$ +"`";
  156. set #RopPoint,RopPoint-@price$;
  157. getitem 5383,1;
  158. mes "Troca Concluída";
  159. close;
  160. case 4:
  161. set @price$, 8000;
  162. `if($@UseMySQL == 1) query_sql "SELECT `rops` FROM `login` WHERE `account_id` = `"+ @Login$ +"`", @rops;
  163. mes "[^9f13f8 Vendedor ^000000]";
  164. mes "Little Angel Doll?";
  165. mes "Ok, Vamos Trocar";
  166. mes "Vou checar se você tem 8k de R";
  167. mes "Se não tiver não falo mais com você";
  168. if(#RopPoint<@price$ || @rops<@price$) close;
  169. if($@UseMySQL == 1) query_sql "UPDATE `login` SET `rops` = `rops` - `"+ @price$ +"` WHERE `account_id` = `"+ @Login$ +"`";
  170. set #RopPoint,RopPoint-@price$;
  171. getitem 5324,1;
  172. mes "Troca Feita!";
  173. close;
  174. case 5:
  175. set @price$, 7000;
  176. `if($@UseMySQL == 1) query_sql "SELECT `rops` FROM `login` WHERE `account_id` = `"+ @Login$ +"`", @rops;
  177. mes "[^9f13f8 Vendedor ^000000]";
  178. mes "Sunglasses[1]?";
  179. mes "Ok, Vamos Trocar";
  180. mes "Vou checar se você tem 7k de R";
  181. mes "Se não tiver não falo mais com você";
  182. if(#RopPoint<@price$ || @rops<@price$) close;
  183. if($@UseMySQL == 1) query_sql "UPDATE `login` SET `rops` = `rops` - `"+ @price$ +"` WHERE `account_id` = `"+ @Login$ +"`";
  184. set #RopPoint,RopPoint-@price$;
  185. getitem 2202,1;
  186. mes "Ok, Troca feita";
  187. close;
  188. case 6:
  189. set @price$, 7000;
  190. `if($@UseMySQL == 1) query_sql "SELECT `rops` FROM `login` WHERE `account_id` = `"+ @Login$ +"`", @rops;
  191. mes "[^9f13f8 Vendedor ^000000]";
  192. mes "Close Helmet??";
  193. mes "Ok, Vamos Trocar";
  194. mes "Vou checar se você tem 7k de R";
  195. mes "Se não tiver não falo mais com você";
  196. if(#RopPoint<@price$ || @rops<@price$) close;
  197. if($@UseMySQL == 1) query_sql "UPDATE `login` SET `rops` = `rops` - `"+ @price$ +"` WHERE `account_id` = `"+ @Login$ +"`";
  198. set #RopPoint,RopPoint-@price$;
  199. getitem 5131,1;
  200. mes "Troca feita com sucesso";
  201. close;
  202. case 7:
  203. set @price$, 7000;
  204. `if($@UseMySQL == 1) query_sql "SELECT `rops` FROM `login` WHERE `account_id` = `"+ @Login$ +"`", @rops;
  205. mes "[^9f13f8 Vendedor ^000000]";
  206. mes "Angeling Hat!?";
  207. mes "Ok, Vamos Trocar";
  208. mes "Vou checar se você tem 7k de R";
  209. mes "Se não tiver não falo mais com você";
  210. if(#RopPoint<@price$ || @rops<@price$) close;
  211. if($@UseMySQL == 1) query_sql "UPDATE `login` SET `rops` = `rops` - `"+ @price$ +"` WHERE `account_id` = `"+ @Login$ +"`";
  212. set #RopPoint,RopPoint-@price$;
  213. getitem 5132,1;
  214. mes "Troca Concluída";
  215. close;
  216. case 8:
  217. set @price$, 7000;
  218. `if($@UseMySQL == 1) query_sql "SELECT `rops` FROM `login` WHERE `account_id` = `"+ @Login$ +"`", @rops;
  219. mes "[^9f13f8 Vendedor ^000000]";
  220. mes "Deviling Hat?";
  221. mes "Ok, Vamos Trocar";
  222. mes "Vou checar se você tem 7k de R";
  223. mes "Se não tiver não falo mais com você";
  224. if(#RopPoint<@price$ || @rops<@price$) close;
  225. if($@UseMySQL == 1) query_sql "UPDATE `login` SET `rops` = `rops` - `"+ @price$ +"` WHERE `account_id` = `"+ @Login$ +"`";
  226. set #RopPoint,RopPoint-@price$;
  227. getitem 5254,1;
  228. mes "Feito";
  229. close;
  230. case 9:
  231. set @price$, 5000;
  232. `if($@UseMySQL == 1) query_sql "SELECT `rops` FROM `login` WHERE `account_id` = `"+ @Login$ +"`", @rops;
  233. mes "[^9f13f8 Vendedor ^000000]";
  234. mes "Coppola?";
  235. mes "Ok, Vamos Trocar";
  236. mes "Vou checar se você tem 5k de R";
  237. mes "Se não tiver não falo mais com você";
  238. if(#RopPoint<@price$ || @rops<@price$) close;
  239. if($@UseMySQL == 1) query_sql "UPDATE `login` SET `rops` = `rops` - `"+ @price$ +"` WHERE `account_id` = `"+ @Login$ +"`";
  240. set #RopPoint,RopPoint-@price$;
  241. getitem 5200,1;
  242. mes "Troca Concluída";
  243. close;
  244. case 10:
  245. mes "[^9f13f8 Vendedor ^000000]";
  246. mes "Volte quando precisar";
  247. close;
  248. }
  249.  
  250.  
  251. }
  252.  
  253. - script ROP -1,{
  254. end;
  255. OnWhisperGlobal:
  256. if (getgmlevel() < $@Rop_MinGMLvl) {
  257. dispbottom "Tsc, Tsc, Você não é GM, então me deixe em paz"; }
  258. set @NameRop$, @whispervar0$;
  259. if (getstrlen(@whispervar1$) > 0) set @NameRop$, @whispervar1$;
  260. if (getstrlen(@F_Add$)<=0) {
  261. set @F_Add$, getcharid(3,@NameRop);
  262. if (!getarraysize(@F_Add$)){
  263. dispbottom "Essa Acc não existe";
  264. }
  265. }
  266. dispbottom "Digite Quandos Créditos "+ @NameRop$ +" Recebera";
  267. callfunc "AddRop";
  268. end;
  269. }
  270. function script AddRop {
  271. set @F_Rop$, query_sql " UPDATE `login` SET `rops` = `rops` + `"+ @RopName"` WHERE `account_id` = `"+ @F_Add$ +"`";
  272. if (!getarraysize(@F_Rop$)) {
  273. dispbottom "Ocorreu um Erro, Reporte isso ao ADM"; }
  274. dispbottom "Rops Adicionados com sucesso";
  275. end;
  276. }
  277. OnInit:
  278. if($@UseMySQL==0) disablenpc "ROP";
  279. end;
  280. }
Advertisement
Add Comment
Please, Sign In to add comment