Jump to content

Yaziid91

Members
  • Posts

    66
  • Joined

  • Last visited

Community Answers

  1. Yaziid91's post in SOLVED : Error apple pointshop was marked as the answer   
    Thanks for your reply but it still doesn't work but I used another method everything works
    SOLVED
     
    // Boutique Hunting ro_prontera,122,247,5 script Hunting Point Shop 861,{ mes "[Points Hunting]"; mes "Vous avez ^0000FF" + #HUNT_Q_POINTS + "^000000 points."; next; if(select("Acheter:Annuler") == 2) { mes "[Points Hunting]"; mes "Revenez quand vous voudrez dépenser vos points!"; close; } mes "[Points Hunting]"; mes "Ouverture de la boutique..."; close2; // Appel de la boutique personnalisée callshop "hunt_shop", 1; npcshopattach "hunt_shop"; end; OnBuyItem: // Trouver le prix de l'objet for (set .@i, 0; .@i < getarraysize(.shop_items); .@i++) { if (.shop_items[.@i] == @bought_nameid) { set .@price, .shop_costs[.@i]; break; } } // Calculer le coût total set .@total_cost, .@price * @bought_quantity; // Vérifier si le joueur a assez de points if (#HUNT_Q_POINTS < .@total_cost) { dispbottom "Vous n'avez pas assez de points de chasse!"; end; } // Vérifier le poids de l'inventaire if (checkweight(@bought_nameid, @bought_quantity) == 0) { dispbottom "Votre inventaire est trop plein!"; end; } // Effectuer l'achat set #HUNT_Q_POINTS, #HUNT_Q_POINTS - .@total_cost; getitem @bought_nameid, @bought_quantity; dispbottom "Achat effectué! Vous avez dépensé " + .@total_cost + " points. Il vous reste " + #HUNT_Q_POINTS + " points."; end; OnInit: // Définir les articles et leurs coûts setarray .shop_items[0], 6232, 50005, 12922, 510108, 50000, 12240, 12622, 60016, 7776; setarray .shop_costs[0], 30, 80, 100, 200, 200, 250, 300, 1000, 50; // Créer la boutique npcshopdelitem "hunt_shop", 512; // Effacer tout article existant // Ajouter chaque article avec son prix (en zeny, mais sera converti en points) for (set .@i, 0; .@i < getarraysize(.shop_items); .@i++) { npcshopadditem "hunt_shop", .shop_items[.@i], .shop_costs[.@i]; } waitingroom "Points Hunting",0; end; } // Définition de la boutique - shop hunt_shop -1,512:-1
×
×
  • Create New...