yojimbos_law

dumb pvp letter script that definitely already exists.

Oct 14th, 2017
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. string lettre = get_property("pvplettre");
  2. string[slot] bestinslot;
  3. foreach i in $slots[]{
  4. int lettreosity = 0;
  5. foreach j in $items[]{
  6. if(j.to_slot()==i & contains_text(j.name.entity_encode().to_lower_case(),lettre) & j.weapon_hands() < 2){
  7. int d = 0;
  8. string[int] whatever = split_string(j.name.entity_encode(),"");
  9. foreach k,m in whatever{
  10. if(m.to_lower_case() == lettre){
  11. d++;
  12. }
  13. }
  14. if(d > lettreosity){
  15. bestinslot[i] = "";
  16. lettreosity = d;
  17. }
  18. if(d == lettreosity){
  19. bestinslot[i] += j.name.entity_encode()+", ";
  20. }
  21. }
  22. }
  23. if(lettreosity > 0){
  24. print_html("the most "+lettre+" "+i+"s: "+bestinslot[i]+"with "+lettreosity+" "+lettre+"s");
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment