mirror of
				https://github.com/ErikasKontenis/SabrehavenServer.git
				synced 2025-10-31 03:56:22 +01:00 
			
		
		
		
	introduce 50 and 100 shop points scrolls
This commit is contained in:
		
							
								
								
									
										15
									
								
								data/actions/scripts/misc/shop_points_scroll.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								data/actions/scripts/misc/shop_points_scroll.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| local hundredPoints = 6554 | ||||
| local fiftyPoints = 6555 | ||||
|  | ||||
| function onUse(player, item, fromPosition, target, toPosition) | ||||
| 	if item:getId() == hundredPoints then | ||||
| 		db.query("UPDATE znote_accounts SET points = points + 100 WHERE account_id = ".. player:getAccountId() .."") | ||||
| 	elseif item:getId() == fiftyPoints then | ||||
| 		db.query("UPDATE znote_accounts SET points = points + 50 WHERE account_id = ".. player:getAccountId() .."") | ||||
| 	end | ||||
| 	 | ||||
| 	item:getPosition():sendMagicEffect(3) | ||||
| 	item:remove() | ||||
| 	player:save() | ||||
| 	return true | ||||
| end | ||||
		Reference in New Issue
	
	Block a user
	 ErikasKontenis
					ErikasKontenis