1. //===== eAthena Script =======================================
  2. //= ZK-VOTE Point Converter & Cash Shop NPCs
  3. //===== By: ==================================================
  4. //= ZRO % Kaneda
  5. //===== Current Version: =====================================
  6. //= 1.0
  7. //===== Compatible With: =====================================
  8. //= eAthena SVN
  9. //===== Description: =========================================
  10. //= Script que Valida los puntos de Votacion
  11. //= Script para crear el Shop de Items por Puntos
  12. //============================================================
  13. prontera.gat,138,166,6 script Puntos de Votacion 864,{
  14. set @dia,gettime(5);
  15. mes "[GM Vella]";
  16. mes "^0000FF¿Hola Deseas Validar tus Puntos de Votacion?^000000";
  17. next;
  18. menu "^008000Si...^000000",L_Puntos,"^004080Ver Puntos Disponibles^000000",L_Puntos,"Salir...",L_End;
  19. L_Puntos:
  20. query_sql("SELECT COUNT(*) FROM vote_table WHERE account_id = '" + getcharid(3) + "' AND collected = '0'", @punto);
  21. if (@punto == 0) goto IMPRIMIR;
  22. set #CASHPOINTS,#CASHPOINTS+@punto;
  23. CLEANER:
  24. query_sql("SELECT COUNT(*) FROM vote_table WHERE account_id = '" + getcharid(3) + "' AND collected = '0'", @punto);
  25. if (@punto == 0) goto IMPRIMIR;
  26. query_sql("UPDATE vote_table SET collected = '" + @dia + "' WHERE account_id ='" + getcharid(3) + "'");
  27. goto CLEANER;
  28. IMPRIMIR:
  29. // Limpia los Registros donde Collected no es igual al Dia de Hoy
  30. query_sql("DELETE FROM vote_table WHERE account_id = '" + getcharid(3) + "' AND collected <> '" + @dia + "'");
  31. mes "[GM Vella]";
  32. mes " ";
  33. mes "Ahora tienes :";
  34. mes " ^0000FF" + #CASHPOINTS + " ^000000puntos de Votacion";
  35. close;
  36. L_END:
  37. mes "Que tengas un Buen dia ^^";
  38. close;
  39. }
  40. // NPC QUE GENERA EL SHOP
  41. //mapa,x,y,posicion cashshop Nombre Sprite_NPC,ITEM:Valor_en_Puntos
  42. prontera,133,166,6 cashshop ZKShop Select-RO 421,4054:110,4134:123,4047:118,12103:18,12214:12,12210:210,12260:10,2410:800,5550:330